org.picocontainer.gems.adapters
Interface PoolingComponentAdapter.Context

All Known Implementing Classes:
PoolingComponentAdapter.DefaultContext
Enclosing class:
PoolingComponentAdapter

public static interface PoolingComponentAdapter.Context

Context of the PoolingComponentAdapter used to initialize it.

Since:
1.2
Author:
Jörg Schaible

Method Summary
 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.
 

Method Detail

getMaxSize

int getMaxSize()
Retrieve the maximum size of the pool. An implementation may return the maximum value or PoolingComponentAdapter.UNLIMITED_SIZE for unlimited growth.

Returns:
the maximum pool size
Since:
1.2

getMaxWaitInMilliseconds

int getMaxWaitInMilliseconds()
Retrieve the maximum number of milliseconds to wait for a returned element. An implementation may return alternatively PoolingComponentAdapter.BLOCK_ON_WAIT or PoolingComponentAdapter.FAIL_ON_WAIT.

Returns:
the maximum number of milliseconds to wait
Since:
1.2

autostartGC

boolean autostartGC()
Allow the implementation to invoke the garbace collector manually if the pool is exhausted.

Returns:
true for an internal call to System.gc()
Since:
1.2

getProxyFactory

com.thoughtworks.proxy.ProxyFactory getProxyFactory()
Retrieve the ProxyFactory to use to create the pooling proxies.

Returns:
the ProxyFactory
Since:
1.2

getResetter

com.thoughtworks.proxy.kit.Resetter getResetter()
Retrieve the Resetter of the objects returning to the pool.

Returns:
the Resetter instance
Since:
1.2

getSerializationMode

int getSerializationMode()
Retrieve the serialization mode of the pool. Following values are possible:

Returns:
the serialization mode
Since:
1.2