net.sourceforge.groboutils.util.datastruct.v1
Interface HashCache.ObjectManager

All Known Implementing Classes:
CacheDirChannelLogger
Enclosing interface:
HashCache

public static interface HashCache.ObjectManager

An interface which needs to be implemented and given to the cache in order to create new instances. It also allows for created objects to be cleaned up.


Method Summary
 void cleanUpObject(java.lang.Object key, java.lang.Object obj)
          Called when the given object is being removed from the cache.
 java.lang.Object createObject(java.lang.Object key)
          Called when a new object needs to be created.
 

Method Detail

createObject

public java.lang.Object createObject(java.lang.Object key)
Called when a new object needs to be created.

Parameters:
key - the key associated with the created object.
Returns:
the newly created object

cleanUpObject

public void cleanUpObject(java.lang.Object key,
                          java.lang.Object obj)
Called when the given object is being removed from the cache.

Parameters:
key - the key associated with the object.
obj - the object being cleaned up.


Copyright © 2001-2003 by The GroboUtils Project