com.wiley.posa3.pooling
Interface Pool

All Known Implementing Classes:
ConnectionPool, ConnectionPool

public interface Pool

Pool provides an interface for the acquisition and release of * resources by resource users. An implementation of the Pool interface would maintain a collection of Resource objects. When a user tries to acquire a resource, the resource would be fetched from this collection. Similarly, when the user releases the resource, it would be returned back to the collection.

Version:
1.0
Author:
Michael Kircher, Prashant Jain

Method Summary
 Resource acquire()
          Acquire a resource from the pool.
 void release(Resource resource)
          Release the resource back to the pool.
 

Method Detail

acquire

public Resource acquire()
Acquire a resource from the pool.

Returns:
Resource a resource from the pool.

release

public void release(Resource resource)
Release the resource back to the pool.

Parameters:
resource - the resource that should be put back in the pool.


Copyright 2004 John Wiley and Sons. All Rights Reserved.