org.scopemvc.util
Interface ObjectPool

All Known Implementing Classes:
BasicObjectPool

public interface ObjectPool

Pool of objects

Version:
$Revision: 1.3 $
Author:
Simon Harris

Method Summary
 java.lang.Object borrowObject()
          Obtains an instance of the pooled class.
 java.lang.Object borrowObjectIfExists()
          Obtains an instance of the pooled class.
 void returnObject(java.lang.Object object)
          Returns an instance to the pool.
 

Method Detail

borrowObject

public java.lang.Object borrowObject()
Obtains an instance of the pooled class. Blocks if no free instances.

Returns:
TODO: Describe the Return Value

borrowObjectIfExists

public java.lang.Object borrowObjectIfExists()
Obtains an instance of the pooled class. Returns null if no free instances.

Returns:
TODO: Describe the Return Value

returnObject

public void returnObject(java.lang.Object object)
Returns an instance to the pool.

Parameters:
object - A previously borrowed instance.


Copyright © 2000-2002 The Scope Team. All Rights Reserved.