public abstract class PooledObjectFactorySupport<T>
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.spi.PooledObjectFactory<T>
PooledObjectFactory based factories.| Modifier and Type | Class and Description |
|---|---|
protected class |
PooledObjectFactorySupport.UtilizationStatistics
Represents utilization statistics
|
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.camel.CamelContext |
camelContext |
protected int |
capacity |
protected BlockingQueue<T> |
pool |
protected Object |
source |
protected PooledObjectFactorySupport.UtilizationStatistics |
statistics |
protected boolean |
statisticsEnabled |
| Constructor and Description |
|---|
PooledObjectFactorySupport() |
PooledObjectFactorySupport(Object source) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doBuild() |
protected void |
doShutdown() |
org.apache.camel.CamelContext |
getCamelContext() |
int |
getCapacity() |
int |
getSize() |
org.apache.camel.spi.PooledObjectFactory.Statistics |
getStatistics() |
boolean |
isPooled() |
boolean |
isStatisticsEnabled() |
void |
purge() |
void |
resetStatistics() |
void |
setCamelContext(org.apache.camel.CamelContext camelContext) |
void |
setCapacity(int capacity) |
void |
setStatisticsEnabled(boolean statisticsEnabled) |
build, doFail, doInit, doLifecycleChange, doResume, doStart, doStop, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected final Object source
protected PooledObjectFactorySupport.UtilizationStatistics statistics
protected org.apache.camel.CamelContext camelContext
protected BlockingQueue<T> pool
protected int capacity
protected boolean statisticsEnabled
public PooledObjectFactorySupport()
public PooledObjectFactorySupport(Object source)
protected void doBuild()
throws Exception
doBuild in class org.apache.camel.support.service.BaseServiceExceptionpublic org.apache.camel.CamelContext getCamelContext()
getCamelContext in interface org.apache.camel.CamelContextAwarepublic void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext in interface org.apache.camel.CamelContextAwarepublic boolean isStatisticsEnabled()
isStatisticsEnabled in interface org.apache.camel.spi.PooledObjectFactory<T>public void setStatisticsEnabled(boolean statisticsEnabled)
setStatisticsEnabled in interface org.apache.camel.spi.PooledObjectFactory<T>public int getSize()
getSize in interface org.apache.camel.spi.PooledObjectFactory<T>public int getCapacity()
getCapacity in interface org.apache.camel.spi.PooledObjectFactory<T>public void setCapacity(int capacity)
setCapacity in interface org.apache.camel.spi.PooledObjectFactory<T>public void resetStatistics()
resetStatistics in interface org.apache.camel.spi.PooledObjectFactory<T>public boolean isPooled()
isPooled in interface org.apache.camel.spi.PooledObjectFactory<T>public void purge()
purge in interface org.apache.camel.spi.PooledObjectFactory<T>public org.apache.camel.spi.PooledObjectFactory.Statistics getStatistics()
getStatistics in interface org.apache.camel.spi.PooledObjectFactory<T>Apache Camel