|
|||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||
java.lang.Objectorg.apache.commons.pool.BaseObjectPool
org.apache.commons.pool.impl.SoftReferenceObjectPool
SoftReference をベースとした ObjectPool です。
| コンストラクタの概要 | |
SoftReferenceObjectPool()
|
|
SoftReferenceObjectPool(PoolableObjectFactory factory)
|
|
SoftReferenceObjectPool(PoolableObjectFactory factory,
int initSize)
|
|
| メソッドの概要 | |
Object |
borrowObject()
プールからインスタンスを取り出します。 |
void |
clear()
プール内にある使用されていないオブジェクトを削除し、関連するリソースを開放します(オプショナルな処理)。 |
void |
close()
このプールを閉じ、関連する全てのリソースを開放します。 |
int |
getNumActive()
現在プールから貸し出されているインスタンスの数を返します(オプショナルな処理)。 |
int |
getNumIdle()
Returns an approximation not less than the of the number of idle instances in the pool. |
void |
returnObject(Object obj)
プールにインスタンスを返します。 |
void |
setFactory(PoolableObjectFactory factory)
新たなインスタンスを生成するために使用する factory を設定します(オプショナルな処理)。
|
| クラス java.lang.Object から継承したメソッド |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
public SoftReferenceObjectPool()
public SoftReferenceObjectPool(PoolableObjectFactory factory)
public SoftReferenceObjectPool(PoolableObjectFactory factory,
int initSize)
throws Exception
| メソッドの詳細 |
public Object borrowObject()
throws Exception
ObjectPool の記述: returnObject
または実装クラスやサブインターフェイスのそれと関連するメソッドを使用して
インスタンスをプールに返さなくてはなりません。
プール内のインスタンスが空の場合のこのメソッドの振る舞いは明示されません (各実装クラスで明示されるでしょう)。
ObjectPool 内の borrowObjectBaseObjectPool 内の borrowObjectExceptionpublic void clear()
ObjectPool の記述:
ObjectPool 内の clearBaseObjectPool 内の clear
public void close()
throws Exception
ObjectPool の記述:
ObjectPool 内の closeBaseObjectPool 内の closeExceptionpublic int getNumActive()
ObjectPool の記述:
ObjectPool 内の getNumActiveBaseObjectPool 内の getNumActivepublic int getNumIdle()
ObjectPool 内の getNumIdleBaseObjectPool 内の getNumIdle
public void returnObject(Object obj)
throws Exception
ObjectPool の記述: borrowObject
または実装クラスやサブインターフェイスのそれと関連するメソッドを使用して
取得されたインスタンスでなくてはなりません。
ObjectPool 内の returnObjectBaseObjectPool 内の returnObjectException
public void setFactory(PoolableObjectFactory factory)
throws IllegalStateException
ObjectPool の記述: factory を設定します(オプショナルな処理)。
ObjectPool 内の setFactoryBaseObjectPool 内の setFactoryIllegalStateException
|
|||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||