com.hazelcast.cache.impl.nearcache
Interface NearCacheRecord<V>

Type Parameters:
V - the type of the value stored by this NearCacheRecord
All Superinterfaces:
Evictable, Expirable
All Known Implementing Classes:
AbstractNearCacheRecord, NearCacheDataRecord, NearCacheObjectRecord

public interface NearCacheRecord<V>
extends Expirable, Evictable

An expirable and evictable data object which represents a near cache entry.

Record of NearCacheRecordStore.

See Also:
Expirable, Evictable

Field Summary
static int TIME_NOT_SET
           
 
Method Summary
 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.
 
Methods inherited from interface com.hazelcast.cache.impl.eviction.Expirable
getExpirationTime, isExpiredAt, setExpirationTime
 
Methods inherited from interface com.hazelcast.cache.impl.eviction.Evictable
getAccessHit, getAccessTime, getCreationTime
 

Field Detail

TIME_NOT_SET

static final int TIME_NOT_SET
See Also:
Constant Field Values
Method Detail

getValue

V getValue()
Gets the value of this NearCacheRecord.

Returns:
the value of this NearCacheRecord

setValue

void setValue(V value)
Sets the value of this NearCacheRecord.

Parameters:
value - the value for this NearCacheRecord

setCreationTime

void setCreationTime(long time)
Sets the creation time of this Evictable in milliseconds.

Parameters:
time - the creation time for this Evictable in milliseconds

setAccessTime

void setAccessTime(long time)
Sets the access time of this Evictable in milliseconds.

Parameters:
time - the latest access time of this Evictable in milliseconds

setAccessHit

void setAccessHit(int hit)
Sets the access hit count of this Evictable.

Parameters:
hit - the access hit count for this Evictable

incrementAccessHit

void incrementAccessHit()
Increases the access hit count of this Evictable as 1.


resetAccessHit

void resetAccessHit()
Resets the access hit count of this Evictable to 0.


isIdleAt

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.

Parameters:
maxIdleMilliSeconds - maximum idle time in milliseconds
now - current time in milliseconds
Returns:
true if exceeds max idle seconds, otherwise false


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.