org.apache.excalibur.mpool
Class VariableSizePool
java.lang.Object
org.apache.excalibur.mpool.VariableSizePool
- All Implemented Interfaces:
- Disposable, ManagablePool, Pool
public final class VariableSizePool
- extends Object
- implements Pool, Disposable, ManagablePool
This is an Pool
that caches Poolable objects for reuse.
Please note that this pool offers no resource limiting whatsoever.
- Since:
- 4.1
- Version:
- CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:34 $
- Author:
- Avalon Development Team
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VariableSizePool
public VariableSizePool(ObjectFactory factory,
int size)
throws Exception
- Constructor for an unmanaged pool
- Throws:
Exception
VariableSizePool
public VariableSizePool(ObjectFactory factory,
int size,
long key)
throws Exception
- Constructor for a managed pool
- Throws:
Exception
acquire
public Object acquire()
throws Exception
- Specified by:
acquire
in interface Pool
- Throws:
Exception
release
public void release(Object pooledObject)
- Specified by:
release
in interface Pool
newInstance
public Object newInstance()
throws Exception
- Specified by:
newInstance
in interface Pool
- Throws:
Exception
dispose
public void dispose()
- Specified by:
dispose
in interface Disposable
shrink
public void shrink(int byNum,
long key)
throws IllegalAccessException
- Specified by:
shrink
in interface ManagablePool
- Throws:
IllegalAccessException
grow
public void grow(int byNum,
long key)
throws IllegalAccessException
- Specified by:
grow
in interface ManagablePool
- Throws:
IllegalAccessException
size
public int size(long key)
throws IllegalAccessException
- Specified by:
size
in interface ManagablePool
- Throws:
IllegalAccessException
Copyright © 2012 Apache Software Foundation. All Rights Reserved.