01: package javax.cache;
02:
03: import java.util.Map;
04:
05: /**
06: * CacheEntry
07: *
08: * @author Brian Goetz
09: */
10: public interface CacheEntry<K, V> extends Map.Entry<K, V> {
11:
12: public long getHits();
13:
14: public long getLastAccessTime();
15:
16: public long getLastUpdateTime();
17:
18: public long getCreationTime();
19:
20: public long getExpirationTime();
21:
22: /**
23: * Returns a version counter.
24: * An implementation may use timestamps for this or an incrementing
25: * number. Timestamps usually have issues with granularity and are harder
26: * to use across clusteres or threads, so an incrementing counter is often safer.
27: */
28: public long getVersion();
29:
30: public boolean isValid();
31:
32: public long getCost();
33: }
|