calypso.util
Class Recycler

java.lang.Object
  |
  +--calypso.util.Recycler

public class Recycler
extends java.lang.Object
implements MemoryPressure


Constructor Summary
Recycler()
           
Recycler(int aGivenCapacity)
           
 
Method Summary
 void empty()
           
 java.lang.Object getRecycledObject()
           
 void panic()
           
 void postGC(long aCurrentHeapSpace, long aMaximumHeapSpace)
           
 void preGC(long aCurrentHeapSpace, long aMaximumHeapSpace)
           
 void recycle(java.lang.Object anObject)
           
 void recycle(java.lang.Object[] anObjectArray)
          Recycles the entire contents of the given list.
 void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Recycler

public Recycler()
Parameters:
-  

Recycler

public Recycler(int aGivenCapacity)
Parameters:
aGivenCapacity - -- size of underlying buffer
Method Detail

reset

public void reset()
Parameters:
none -  
Returns:
none

recycle

public void recycle(java.lang.Object anObject)
Parameters:
anObject - -- object to be recycled
Returns:
none

recycle

public void recycle(java.lang.Object[] anObjectArray)
Recycles the entire contents of the given list.
Parameters:
-  
Returns:
 
Throws:
-  

getRecycledObject

public java.lang.Object getRecycledObject()
Parameters:
none -  
Returns:
object or null

empty

public void empty()
Parameters:
none -  
Returns:
none

preGC

public void preGC(long aCurrentHeapSpace,
                  long aMaximumHeapSpace)
Specified by:
preGC in interface MemoryPressure
Parameters:
-  
Returns:
 

postGC

public void postGC(long aCurrentHeapSpace,
                   long aMaximumHeapSpace)
Specified by:
postGC in interface MemoryPressure
Parameters:
-  
Returns:
 

panic

public void panic()
Specified by:
panic in interface MemoryPressure
Parameters:
-  
Returns: