V - the type of the value stored by this AbstractNearCacheRecordpublic abstract class AbstractNearCacheRecord<V> extends Object implements NearCacheRecord<V>
NearCacheRecord with value and
 expiration time as internal state.| Modifier and Type | Field and Description | 
|---|---|
| protected int | accessHit | 
| protected long | accessTime | 
| protected long | creationTime | 
| protected long | expirationTime | 
| protected long | sequence | 
| protected UUID | uuid | 
| protected V | value | 
TIME_NOT_SET| Constructor and Description | 
|---|
| AbstractNearCacheRecord(V value,
                       long creationTime,
                       long expirationTime) | 
| Modifier and Type | Method and Description | 
|---|---|
| int | getAccessHit()Gets the access hit count of this  Evictable. | 
| long | getCreationTime()Gets the creation time of this  Evictablein milliseconds. | 
| long | getExpirationTime()Gets the expiration time in milliseconds. | 
| long | getInvalidationSequence() | 
| long | getLastAccessTime()Gets the latest access time difference of this  Evictablein milliseconds. | 
| V | getValue()Gets the value of this  Evictable. | 
| boolean | hasSameUuid(UUID thatUuid) | 
| void | incrementAccessHit()Increases the access hit count of this  Evictableby1. | 
| boolean | isExpiredAt(long now)Checks whether the expiration time is passed with respect to the provided time. | 
| 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  Evictableto0. | 
| void | setAccessHit(int accessHit)Sets the access hit count of this  Evictable. | 
| void | setAccessTime(long accessTime)Sets the access time of this  Evictablein milliseconds. | 
| void | setCreationTime(long creationTime)Sets the creation time of this  Evictablein milliseconds. | 
| void | setExpirationTime(long expirationTime)Sets the expiration time in milliseconds. | 
| void | setInvalidationSequence(long sequence) | 
| void | setUuid(UUID uuid) | 
| void | setValue(V value)Sets the value of this  NearCacheRecord. | 
protected V value
protected long creationTime
protected long sequence
protected UUID uuid
protected volatile long expirationTime
protected volatile long accessTime
protected volatile int accessHit
public AbstractNearCacheRecord(V value, long creationTime, long expirationTime)
public V getValue()
EvictableEvictable.public void setValue(V value)
NearCacheRecordNearCacheRecord.setValue in interface NearCacheRecord<V>value - the value for this NearCacheRecordpublic long getExpirationTime()
ExpirablegetExpirationTime in interface ExpirableSystem.currentTimeMillis()public void setExpirationTime(long expirationTime)
ExpirablesetExpirationTime in interface ExpirableSystem.currentTimeMillis()public long getCreationTime()
EvictableEvictable in milliseconds.getCreationTime in interface Evictable<V>Evictable in millisecondspublic void setCreationTime(long creationTime)
NearCacheRecordEvictable in milliseconds.setCreationTime in interface NearCacheRecord<V>creationTime - the creation time for this Evictable in millisecondspublic long getLastAccessTime()
EvictableEvictable in milliseconds.getLastAccessTime in interface Evictable<V>Evictable in millisecondspublic void setAccessTime(long accessTime)
NearCacheRecordEvictable in milliseconds.setAccessTime in interface NearCacheRecord<V>accessTime - the latest access time of this Evictable in millisecondspublic int getAccessHit()
EvictableEvictable.getAccessHit in interface Evictable<V>Evictablepublic void setAccessHit(int accessHit)
NearCacheRecordEvictable.setAccessHit in interface NearCacheRecord<V>accessHit - the access hit count for this Evictablepublic void incrementAccessHit()
NearCacheRecordEvictable by 1.incrementAccessHit in interface NearCacheRecord<V>public void resetAccessHit()
NearCacheRecordEvictable to 0.resetAccessHit in interface NearCacheRecord<V>public boolean isExpiredAt(long now)
ExpirableReturns true if and only if now > getExpirationTime()
isExpiredAt in interface Expirablenow - time in milliseconds.public long getInvalidationSequence()
getInvalidationSequence in interface NearCacheRecord<V>public void setInvalidationSequence(long sequence)
setInvalidationSequence in interface NearCacheRecord<V>sequence - last known invalidation sequence at time of this records' creationpublic boolean hasSameUuid(UUID thatUuid)
hasSameUuid in interface NearCacheRecord<V>true if supplied uuid equals existing one, otherwise and when one of supplied
 or existing is null returns falsepublic void setUuid(UUID uuid)
setUuid in interface NearCacheRecord<V>uuid - last known uuid of invalidation source at time of this records' creationpublic boolean isIdleAt(long maxIdleMilliSeconds,
                        long now)
NearCacheRecordmaxIdleSeconds.isIdleAt in interface NearCacheRecord<V>maxIdleMilliSeconds - maximum idle time in millisecondsnow - current time in millisecondstrue if exceeds max idle seconds, otherwise falseCopyright © 2016 Hazelcast, Inc.. All Rights Reserved.