org.apache.avalon.excalibur.pool
Interface Recyclable

All Superinterfaces:
Poolable
All Known Subinterfaces:
PoolSettable
All Known Implementing Classes:
AbstractJdbcConnection, XSLTProcessorImpl

public interface Recyclable
extends Poolable

This interface standardizes the behaviour of a recyclable object. A recyclable object is defined as an object that can be used to encapsulate another object without being altered by its content. Therefore, a recyclable object may be recycled and reused many times. This is helpful in cases where recyclable objects are continously created and destroyed, causing a much greater amount of garbage to be collected by the JVM garbage collector. By making it recyclable, it is possible to reduce the GC execution time, thus incrementing the overall performance of a process and decrementing the chance of memory overflow. Every implementation must provide their own method to allow this recyclable object to be reused by setting its content.

Since:
4.0
Version:
CVS $Revision: 1.6 $ $Date: 2004/03/29 16:50:37 $
Author:
Avalon Development Team

Method Summary
 void recycle()
          This method should be implemented to remove all costly resources in object.
 

Method Detail

recycle

public void recycle()
This method should be implemented to remove all costly resources in object. These resources can be object references, database connections, threads, etc. What is categorised as "costly" resources is determined on a case by case analysis.



Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.