org.picocontainer.gems.adapters
Interface PoolingComponentAdapter.Context

All Known Implementing Classes:
PoolingComponentAdapter.DefaultContext
Enclosing interface:
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.
 ProxyFactory getProxyFactory()
          Retrieve the ProxyFactory to use to create the pooling proxies.
 Resetter getResetter()
          Retrieve the Resetter of the objects returning to the pool.
 int getSerializationMode()
          Retrieve the serialization mode of the pool.
 

Method Detail

getMaxSize

public 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

public 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

public 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

public ProxyFactory getProxyFactory()
Retrieve the ProxyFactory to use to create the pooling proxies.

Returns:
the ProxyFactory
Since:
1.2

getResetter

public Resetter getResetter()
Retrieve the Resetter of the objects returning to the pool.

Returns:
the Resetter instance
Since:
1.2

getSerializationMode

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

Returns:
the serialization mode
Since:
1.2


Copyright © 2003-2007 Codehaus. All Rights Reserved.