public static class PoolingComponentAdapter.DefaultContext extends java.lang.Object implements PoolingComponentAdapter.Context
Constructor and Description |
---|
PoolingComponentAdapter.DefaultContext() |
Modifier and Type | Method and Description |
---|---|
boolean |
autostartGC()
Allow the implementation to invoke the garbace collector manually if the pool is
exhausted.
|
int |
getMaxSize()
Retrieve the maximum size of the pool.
|
int |
getMaxWaitInMilliseconds()
Retrieve the maximum number of milliseconds to wait for a returned element.
|
com.thoughtworks.proxy.ProxyFactory |
getProxyFactory()
Retrieve the ProxyFactory to use to create the pooling proxies.
|
com.thoughtworks.proxy.kit.Resetter |
getResetter()
Retrieve the
Resetter of the objects returning to the pool. |
int |
getSerializationMode()
Retrieve the serialization mode of the pool.
|
public PoolingComponentAdapter.DefaultContext()
public int getMaxSize()
PoolingComponentAdapter.UNLIMITED_SIZE
for unlimited growth. Returns PoolingComponentAdapter.DEFAULT_MAX_SIZE
.getMaxSize
in interface PoolingComponentAdapter.Context
public int getMaxWaitInMilliseconds()
PoolingComponentAdapter.BLOCK_ON_WAIT
or
PoolingComponentAdapter.FAIL_ON_WAIT
. Returns PoolingComponentAdapter.FAIL_ON_WAIT
.getMaxWaitInMilliseconds
in interface PoolingComponentAdapter.Context
public boolean autostartGC()
false
.autostartGC
in interface PoolingComponentAdapter.Context
true
for an internal call to System.gc()
public com.thoughtworks.proxy.ProxyFactory getProxyFactory()
StandardProxyFactory
.getProxyFactory
in interface PoolingComponentAdapter.Context
ProxyFactory
public com.thoughtworks.proxy.kit.Resetter getResetter()
Resetter
of the objects returning to the pool. Returns the PoolingComponentAdapter.DEFAULT_RESETTER
.getResetter
in interface PoolingComponentAdapter.Context
public int getSerializationMode()
Pool.SERIALIZATION_STANDARD
Pool.SERIALIZATION_NONE
Pool.SERIALIZATION_FORCE
Pool.SERIALIZATION_STANDARD
.getSerializationMode
in interface PoolingComponentAdapter.Context