net.sf.farrago.namespace.util
Class FarragoDataWrapperCache.WrapperFactory

java.lang.Object
  extended by net.sf.farrago.namespace.util.FarragoDataWrapperCache.WrapperFactory
All Implemented Interfaces:
FarragoObjectCache.CachedObjectFactory
Enclosing class:
FarragoDataWrapperCache

private class FarragoDataWrapperCache.WrapperFactory
extends Object
implements FarragoObjectCache.CachedObjectFactory


Field Summary
private  String libraryName
           
private  String mofId
           
private  Properties options
           
 
Constructor Summary
FarragoDataWrapperCache.WrapperFactory(String mofId, String libraryName, Properties options)
           
 
Method Summary
 void initializeEntry(Object key, FarragoObjectCache.UninitializedEntry entry)
          Initializes a cache entry.
 boolean isStale(Object value)
          Tests a cached object for staleness.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mofId

private String mofId

libraryName

private String libraryName

options

private Properties options
Constructor Detail

FarragoDataWrapperCache.WrapperFactory

FarragoDataWrapperCache.WrapperFactory(String mofId,
                                       String libraryName,
                                       Properties options)
Method Detail

initializeEntry

public void initializeEntry(Object key,
                            FarragoObjectCache.UninitializedEntry entry)
Description copied from interface: FarragoObjectCache.CachedObjectFactory
Initializes a cache entry.

Specified by:
initializeEntry in interface FarragoObjectCache.CachedObjectFactory
Parameters:
key - key of the object to be constructed
entry - to initialize by calling its FarragoObjectCache.UninitializedEntry.initialize(java.lang.Object, long, boolean) method; failing to call initialize will lead to a subsequent assertion (unless an exception is thrown to indicate initialization failure)

isStale

public boolean isStale(Object value)
Description copied from interface: FarragoObjectCache.CachedObjectFactory
Tests a cached object for staleness.

Specified by:
isStale in interface FarragoObjectCache.CachedObjectFactory
Returns:
true if object is stale, meaning it must not be returned from a pin call, and should be discarded from the cache when detected