org.apache.abdera.protocol.util
Class PoolManager<T>
java.lang.Object
org.apache.abdera.protocol.util.PoolManager<T>
- All Implemented Interfaces:
- ItemManager<T>
- Direct Known Subclasses:
- AbstractItemManager
public abstract class PoolManager<T>
- extends Object
- implements ItemManager<T>
Implements a simple pool manager.
By default, an upper limit to the pool is set at 25 entries.
New items can always be created, but if more than 25 entries
are released back to the pool, the extras are discarded.
Items added to the stack should never maintain any kind of
state as it is entirely possible that different threads will
be grabbing items from the pool
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.abdera.protocol.ItemManager |
get |
PoolManager
protected PoolManager()
PoolManager
protected PoolManager(int max)
getInstance
protected T getInstance()
release
public void release(T t)
- Description copied from interface:
ItemManager
- Release an item
- Specified by:
release
in interface ItemManager<T>
internalNewInstance
protected abstract T internalNewInstance()
Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.