public interface PooledObjectFactory<T> extends Service, CamelContextAware
Modifier and Type | Interface and Description |
---|---|
static interface |
PooledObjectFactory.Statistics
Utilization statistics of the this factory.
|
Modifier and Type | Method and Description |
---|---|
T |
acquire()
Acquires an object from the pool (if any)
|
int |
getCapacity()
The capacity the pool uses for storing objects.
|
int |
getSize()
The current number of objects in the pool
|
PooledObjectFactory.Statistics |
getStatistics()
Gets the usage statistics
|
boolean |
isPooled()
Whether the factory is pooled.
|
boolean |
isStatisticsEnabled()
Whether statistics is enabled.
|
void |
purge()
Purges the internal cache (if pooled)
|
boolean |
release(T t)
Releases the object back to the pool
|
void |
resetStatistics()
Reset the statistics
|
void |
setCapacity(int capacity)
The capacity the pool uses for storing objects.
|
void |
setStatisticsEnabled(boolean statisticsEnabled)
Whether statistics is enabled.
|
getCamelContext, setCamelContext, trySetCamelContext
int getSize()
int getCapacity()
void setCapacity(int capacity)
boolean isStatisticsEnabled()
void setStatisticsEnabled(boolean statisticsEnabled)
void resetStatistics()
void purge()
PooledObjectFactory.Statistics getStatistics()
boolean isPooled()
T acquire()
boolean release(T t)
t
- the objectApache Camel