Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


com.tangosol.net.cache
Interface ConfigurableCacheMap.Entry

All Superinterfaces:
java.util.Map.Entry
All Known Implementing Classes:
LocalCache.Entry, ObservableSplittingBackingCache.EntrySet.Entry, OldCache.Entry, SerializationCache.EntrySet.Entry
Enclosing interface:
ConfigurableCacheMap

public static interface ConfigurableCacheMap.Entry
extends java.util.Map.Entry

A cache Entry carries information additional to the base Map Entry in order to support eviction and expiry.


Method Summary
 long getExpiryMillis()
          Determine when the cache entry will expire, if ever.
 long getLastTouchMillis()
          Determine when the cache entry was last touched.
 int getTouchCount()
          Determine the number of times that the cache entry has been touched (since the touch count was last reset).
 int getUnits()
          Determine the number of cache units used by this Entry.
 void setExpiryMillis(long lMillis)
          Specify when the cache entry will expire, or disable expiry.
 void setUnits(int cUnits)
          Specify the number of cache units used by this Entry.
 void touch()
          Indicate to the entry that it has been touched, such as when it is accessed or modified.

 

Methods inherited from interface java.util.Map.Entry
equals, getKey, getValue, hashCode, setValue

 

Method Detail

touch

void touch()
Indicate to the entry that it has been touched, such as when it is accessed or modified.

getTouchCount

int getTouchCount()
Determine the number of times that the cache entry has been touched (since the touch count was last reset).
Returns:
the number of times that the cache entry has been touched

getLastTouchMillis

long getLastTouchMillis()
Determine when the cache entry was last touched.
Returns:
the date/time value, in millis, when the entry was most recently touched

getExpiryMillis

long getExpiryMillis()
Determine when the cache entry will expire, if ever.
Returns:
the date/time value, in millis, when the entry will (or did) expire; zero indicates no expiry

setExpiryMillis

void setExpiryMillis(long lMillis)
Specify when the cache entry will expire, or disable expiry. Note that if the cache is configured for automatic expiry, each subsequent update to this cache entry will reschedule the expiry time.
Parameters:
lMillis - pass the date/time value, in millis, for when the entry will expire, or pass zero to disable automatic expiry

getUnits

int getUnits()
Determine the number of cache units used by this Entry.
Returns:
an integer value 0 or greater, with a larger value signifying a higher cost; -1 implies that the Entry has been discarded

setUnits

void setUnits(int cUnits)
Specify the number of cache units used by this Entry.
Parameters:
cUnits - an integer value 0 or greater, with a larger value signifying a higher cost

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.