JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.alsUtility
Class ObjectCache

java.lang.Object
  extended bygov.nasa.alsUtility.ObjectCache
All Implemented Interfaces:
java.io.Serializable

public class ObjectCache
extends java.lang.Object
implements java.io.Serializable

cache objects to avoid object re-allocation. Objects created will not be garbage collected until the ObjectCache is garbage collected. Object class must have a constructor that takes no arguments. This constructor will be used to create the objects as needed.

See Also:
Serialized Form

Constructor Summary
ObjectCache(java.lang.String inClass)
           
 
Method Summary
 java.lang.Object getObject()
           
 void reinitialize()
          Call when it's ok to reuse all of the objects in the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectCache

public ObjectCache(java.lang.String inClass)
Method Detail

getObject

public java.lang.Object getObject()

reinitialize

public void reinitialize()
Call when it's ok to reuse all of the objects in the cache.


JavaGenes, NASA Ames. Written largely by Al Globus