Modifier and Type | Class and Description |
---|---|
class |
Pool<T extends PoolableObject<X>,X extends Exception>
A simple object pool implementation.
|
interface |
PoolableObjectConsumer<T extends PoolableObject<X>,X extends Exception>
An operation that takes a single
PoolableObject . |
interface |
PoolableObjectFactory<T extends PoolableObject<X>,X extends Exception>
A factory for
PoolableObject s. |
Modifier and Type | Class and Description |
---|---|
class |
ObjectWrapper<T>
A poolable object that wraps a single value.
|
Modifier and Type | Method and Description |
---|---|
static <T extends PoolableObject<None>> |
Pool.throwingNone(PoolConfig config,
Supplier<T> supplier,
PoolLogger logger)
Creates a new pool that throws no exceptions.
|
Modifier and Type | Method and Description |
---|---|
void |
PoolLogger.acquiredObject(PoolableObject<?> object,
int idleCount,
int poolSize)
Called when a
PoolableObject is acquired from a Pool . |
void |
PoolLogger.createdNonPooledObject(PoolableObject<?> object)
Called when a new
PoolableObject has been created that will not be returned to the pool it was
acquired from. |
void |
PoolLogger.createdObject(PoolableObject<?> object)
Called when a new
PoolableObject has been created. |
void |
PoolLogger.decreasedObjectRefCount(PoolableObject<?> object,
int refCount)
Called when a reference was removed from a
PoolableObject . |
void |
PoolLogger.increasedObjectRefCount(PoolableObject<?> object,
int refCount)
Called when an additional reference was added to a
PoolableObject . |
void |
PoolLogger.objectEvent(LogLevel level,
PoolableObject<?> object,
String message)
Called when
logEvent(LogLevel, String) is called. |
void |
PoolLogger.objectEvent(LogLevel level,
PoolableObject<?> object,
Supplier<String> messageSupplier)
Called when
logEvent(LogLevel, Supplier) is called. |
void |
PoolLogger.objectIdleTooLong(PoolableObject<?> object,
int idleCount,
int poolSize)
Called when a
PoolableObject has been idle for too long. |
void |
PoolLogger.objectInvalidated(PoolableObject<?> object,
int idleCount,
int poolSize)
Called when a
PoolableObject is no longer valid and has been removed from its Pool . |
void |
PoolLogger.releasedObjectResources(PoolableObject<?> object)
Called when the resources of a
PoolableObject have been released. |
void |
PoolLogger.releaseObjectResourcesFailed(PoolableObject<?> object,
Exception exception)
Called when an error occurs when quietly releasing the resources of a
PoolableObject . |
void |
PoolLogger.releasingObjectResources(PoolableObject<?> object)
Called before the resources of a
PoolableObject will be released. |
void |
PoolLogger.returnedObject(PoolableObject<?> object,
int idleCount,
int poolSize)
Called when a
PoolableObject is returned to a Pool . |
Copyright © 2022. All rights reserved.