intarsys runtime library

de.intarsys.tools.pool
Interface IPool

All Known Implementing Classes:
GenericPool

public interface IPool

A pool of objects.


Method Summary
 void checkin(Object object)
          Add an object to the pool.
 Object checkout()
          Get an object from the pool.
 void close()
          Close the pool.
 void destroy(Object object)
          Destroy an object previously allocated from the pool.
 

Method Detail

checkin

void checkin(Object object)
             throws Exception
Add an object to the pool.

Parameters:
object - The object to be added to the pool.
Throws:
Exception

checkout

Object checkout()
                throws Exception
Get an object from the pool.

This may be a reused object or a new one, up to the pool strategy and size.

Returns:
A new object from the pool.
Throws:
Exception

close

void close()
           throws Exception
Close the pool.

Throws:
Exception

destroy

void destroy(Object object)
             throws Exception
Destroy an object previously allocated from the pool.

Parameters:
object - The object to be destroyed.
Throws:
Exception

intarsys runtime library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.