PooliT v2.0

org.ascentphase.poolit
Interface Pooler

All Known Implementing Classes:
DisposablePooler, FixedPooler, LimitedPooler, NotifierPooler, NotifyPooler, TimeoutPooler

public interface Pooler

Defines required methods to be implemented for Poolers.

Author:
Huy Duong

Method Summary
 void close()
          Releases all objects in the pool and any resources held by these objects.
 java.lang.Object fetch()
          Retrieves an object from the pool.
 void release(java.lang.Object o)
          Returns an object to the pool.
 

Method Detail

fetch

public java.lang.Object fetch()
                       throws FetchException
Retrieves an object from the pool.

Returns:
an object from the pool
Throws:
FetchException - if the pooler is unable to return an object from the pool.

release

public void release(java.lang.Object o)
Returns an object to the pool.

Parameters:
o - the object

close

public void close()
Releases all objects in the pool and any resources held by these objects.


PooliT v2.0

Copyright © 2005 Ascent Phase Corp.