org.apache.avalon.excalibur.pool
クラス SingleThreadedPool

java.lang.Object
  |
  +--org.apache.avalon.excalibur.pool.SingleThreadedPool
すべての実装インタフェース:
org.apache.avalon.framework.component.Component, Pool, Resizable, org.apache.avalon.framework.thread.SingleThreaded

public class SingleThreadedPool
extends java.lang.Object
implements Pool, org.apache.avalon.framework.thread.SingleThreaded, Resizable

This is an Pool that caches Poolable objects for reuse.

導入されたバージョン:
4.0
バージョン:
CVS $Revision: 1.7 $ $Date: 2001/12/26 16:15:22 $
作成者:
Berin Loritsch, Stefano Mazzocchi, Peter Donald

フィールドの概要
protected  PoolController m_controller
           
protected  int m_count
           
protected  ObjectFactory m_factory
           
protected  int m_initial
           
protected  int m_maximum
           
protected  Poolable[] m_pool
           
 
コンストラクタの概要
SingleThreadedPool(java.lang.Class clazz, int initial, int maximum)
           
SingleThreadedPool(ObjectFactory factory, PoolController controller, int initial, int maximum)
           
 
メソッドの概要
 void fill(int fillSize)
          This fills the pool to the size specified in parameter.
 Poolable get()
          Retrieve an object from pool.
 int getCapacity()
          Return the total number of slots in Pool
 int getSize()
          推奨されていません。 use the official size() method instead
 void grow(int increase)
          This fills the pool by the size specified in parameter.
 void initialize()
           
 void put(Poolable poolable)
          Place an object in pool.
 void shrink(int decrease)
          This shrinks the pool by parameter size.
 int size()
          Get the number of used slots in Pool
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

m_count

protected int m_count

m_pool

protected Poolable[] m_pool

m_factory

protected ObjectFactory m_factory

m_controller

protected PoolController m_controller

m_maximum

protected int m_maximum

m_initial

protected int m_initial
コンストラクタの詳細

SingleThreadedPool

public SingleThreadedPool(java.lang.Class clazz,
                          int initial,
                          int maximum)
                   throws java.lang.Exception

SingleThreadedPool

public SingleThreadedPool(ObjectFactory factory,
                          PoolController controller,
                          int initial,
                          int maximum)
                   throws java.lang.Exception
メソッドの詳細

initialize

public void initialize()
                throws java.lang.Exception

get

public Poolable get()
             throws java.lang.Exception
Retrieve an object from pool.
定義:
インタフェース Pool 内の get
戻り値:
an object from Pool

put

public void put(Poolable poolable)
Place an object in pool.
定義:
インタフェース Pool 内の put
パラメータ:
poolable - the object to be placed in pool

getCapacity

public final int getCapacity()
Return the total number of slots in Pool
戻り値:
the total number of slots

getSize

public final int getSize()
推奨されていません。 use the official size() method instead

Get the number of used slots in Pool
戻り値:
the number of used slots

size

public final int size()
Get the number of used slots in Pool
戻り値:
the number of used slots

fill

public final void fill(int fillSize)
                throws java.lang.Exception
This fills the pool to the size specified in parameter.

grow

public final void grow(int increase)
This fills the pool by the size specified in parameter.
定義:
インタフェース Resizable 内の grow

shrink

public final void shrink(int decrease)
This shrinks the pool by parameter size.
定義:
インタフェース Resizable 内の shrink


"Copyright ? 2001 Apache Jakarta Project. All Rights Reserved."