V
- the type of the value stored by this NearCacheRecord
public interface NearCacheRecord<V> extends Expirable, Evictable
An expirable and evictable data object which represents a near cache entry.
Record ofNearCacheRecordStore
.Modifier and Type | Field and Description |
---|---|
static int |
TIME_NOT_SET |
Modifier and Type | Method and Description |
---|---|
V |
getValue()
Gets the value of this
NearCacheRecord . |
void |
incrementAccessHit()
Increases the access hit count of this
Evictable as 1 . |
boolean |
isIdleAt(long maxIdleMilliSeconds,
long now)
Checks whether the maximum idle time is passed with respect to the provided time
without any access during this time period as
maxIdleSeconds . |
void |
resetAccessHit()
Resets the access hit count of this
Evictable to 0 . |
void |
setAccessHit(int hit)
Sets the access hit count of this
Evictable . |
void |
setAccessTime(long time)
Sets the access time of this
Evictable in milliseconds. |
void |
setCreationTime(long time)
Sets the creation time of this
Evictable in milliseconds. |
void |
setValue(V value)
Sets the value of this
NearCacheRecord . |
getExpirationTime, isExpiredAt, setExpirationTime
getAccessHit, getAccessTime, getCreationTime
static final int TIME_NOT_SET
V getValue()
NearCacheRecord
.NearCacheRecord
void setValue(V value)
NearCacheRecord
.value
- the value for this NearCacheRecord
void setCreationTime(long time)
Evictable
in milliseconds.time
- the creation time for this Evictable
in millisecondsvoid setAccessTime(long time)
Evictable
in milliseconds.time
- the latest access time of this Evictable
in millisecondsvoid setAccessHit(int hit)
Evictable
.hit
- the access hit count for this Evictable
void incrementAccessHit()
Evictable
as 1
.void resetAccessHit()
Evictable
to 0
.boolean isIdleAt(long maxIdleMilliSeconds, long now)
maxIdleSeconds
.maxIdleMilliSeconds
- maximum idle time in millisecondsnow
- current time in millisecondstrue
if exceeds max idle seconds, otherwise false
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.