org.picocontainer.gems.behaviors
Interface Pooled.Context

All Known Implementing Classes:
Pooled.DefaultContext
Enclosing class:
Pooled<T>

public static interface Pooled.Context

Context of the Pooled used to initialize it.

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

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

Returns:
the maximum pool size

getMaxWaitInMilliseconds

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

Returns:
the maximum number of milliseconds to wait

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()

getProxyFactory

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

Returns:
the ProxyFactory

getResetter

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

Returns:
the Resetter instance

getSerializationMode

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

Returns:
the serialization mode


Copyright © 2003-2010 Codehaus. All Rights Reserved.