net.sf.ashkay.strategies
Class TimeExpirationCachingStrategy

java.lang.Object
  extended bynet.sf.ashkay.strategies.TimeExpirationCachingStrategy
All Implemented Interfaces:
CachingStrategy

public class TimeExpirationCachingStrategy
extends java.lang.Object
implements CachingStrategy

TimeExpirationCachingStrategy expires objects in the cache after a set amount of time.

Author:
Dave Brown

Constructor Summary
TimeExpirationCachingStrategy(long timeOut)
          Creates the caching strategy with the specified timeout.
 
Method Summary
 CacheEntry prepare(CacheEntry entry)
          Prepares the cache entry for caching with this strategy.
NOTE: Be Careful: a caching strategy is allowed to return a different CacheEntry, so make sure that you store the results of this method and don't assume the symantics of pass by reference.
 boolean validate(CacheEntry entry)
          Validates this cache entry for this caching strategy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeExpirationCachingStrategy

public TimeExpirationCachingStrategy(long timeOut)
Creates the caching strategy with the specified timeout.

Parameters:
timeOut - - the time out length for the cache entries
Method Detail

prepare

public CacheEntry prepare(CacheEntry entry)
Description copied from interface: CachingStrategy
Prepares the cache entry for caching with this strategy.
NOTE: Be Careful: a caching strategy is allowed to return a different CacheEntry, so make sure that you store the results of this method and don't assume the symantics of pass by reference.

Specified by:
prepare in interface CachingStrategy

validate

public boolean validate(CacheEntry entry)
Description copied from interface: CachingStrategy
Validates this cache entry for this caching strategy.

Specified by:
validate in interface CachingStrategy


Copyright © 2004 . All Rights Reserved.