org.jboss.dna.graph.cache
Class BasicCachePolicy
java.lang.Object
org.jboss.dna.graph.cache.BasicCachePolicy
- All Implemented Interfaces:
- Serializable, CachePolicy
public class BasicCachePolicy
- extends Object
- implements CachePolicy
- Author:
- Randall Hauch
- See Also:
- Serialized Form
BasicCachePolicy
public BasicCachePolicy()
BasicCachePolicy
public BasicCachePolicy(long timeToCache,
TimeUnit unit)
getTimeToLive
public long getTimeToLive()
- Get the system time in milliseconds before which the node data remains valid.
- Specified by:
getTimeToLive
in interface CachePolicy
- Returns:
- the number of milliseconds that the cached data should be used before consulting the original source.
- See Also:
CachePolicy.getTimeToLive()
setTimeToLive
public void setTimeToLive(long timeToLive,
TimeUnit unit)
- Set the time for values and information to live in the cache.
- Parameters:
timeToLive
- Sets timeToLive to the specified value.unit
- the unit in which the time to live value is defined
isEmpty
public boolean isEmpty()
getUnmodifiable
public CachePolicy getUnmodifiable()
equals
public boolean equals(Object obj)
-
- Overrides:
equals
in class Object
- See Also:
Object.equals(java.lang.Object)
toString
public String toString()
-
- Overrides:
toString
in class Object
- See Also:
Object.toString()
Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.