Interface FarragoObjectCache.CachedObjectFactory

All Known Implementing Classes:
FarragoDataWrapperCache.ServerFactory, FarragoDataWrapperCache.WrapperFactory, FarragoObjectCacheTest.RentalCarAgency, ReposDefaultValueFactory
Enclosing class:

public static interface FarragoObjectCache.CachedObjectFactory

Factory interface for producing cached objects. This must be implemented by callers to FarragoObjectCache.

Method Summary
 void initializeEntry(Object key, FarragoObjectCache.UninitializedEntry entry)
          Initializes a cache entry.
 boolean isStale(Object value)
          Tests a cached object for staleness.

Method Detail


void initializeEntry(Object key,
                     FarragoObjectCache.UninitializedEntry entry)
Initializes a cache entry.

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)


boolean isStale(Object value)
Tests a cached object for staleness.

true if object is stale, meaning it must not be returned from a pin call, and should be discarded from the cache when detected