org.objectweb.dream.pool
Interface ObjectPool

All Known Implementing Classes:
ObjectPoolImpl

public interface ObjectPool

This interface defines an object pool. An object pool aims at improving performances by avoiding unnecessary object creations.


Field Summary
static String ITF_NAME
          The commonly used name to refer to this interface.
 
Method Summary
 Recyclable newInstance()
          Returns a new instance of object.
 void recycleInstance(Recyclable recyclable)
          Recycles the object so that it can be reused.
 

Field Detail

ITF_NAME

public static final String ITF_NAME
The commonly used name to refer to this interface.

See Also:
Constant Field Values
Method Detail

newInstance

public Recyclable newInstance()
Returns a new instance of object.

Returns:
a new instance of object.

recycleInstance

public void recycleInstance(Recyclable recyclable)
Recycles the object so that it can be reused.

Parameters:
recyclable - the object to be recycled.


Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.