Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.