org.apache.excalibur.mpool
Interface Resettable


public interface Resettable

This interface standardizes the behaviour of a resettable object. A resettable object is defined as an object that can be used to encapsulate another object without being altered by its content. Therefore, a resettable object may be reset and reused many times. This is helpful in cases where resettable objects are continously created and destroyed, causing a much greater amount of garbage to be collected by the JVM garbage collector. By making it resettable, 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.5 $ $Date: 2004/02/28 11:47:33 $
Author:
Avalon Development Team

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

Method Detail

reset

public void reset()
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.