V
- the type of the value stored by this NearCacheRecord
public interface NearCacheRecord<V> extends Expirable, Evictable<V>
Record of NearCacheRecordStore
.
Modifier and Type | Field and Description |
---|---|
static long |
NOT_RESERVED |
static long |
READ_PERMITTED |
static long |
RESERVED |
static int |
TIME_NOT_SET |
static long |
UPDATE_STARTED |
Modifier and Type | Method and Description |
---|---|
boolean |
casRecordState(long expect,
long update) |
long |
getInvalidationSequence() |
int |
getPartitionId() |
long |
getRecordState() |
boolean |
hasSameUuid(UUID uuid) |
void |
incrementAccessHit()
Increases the access hit count of this
Evictable by 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 |
setInvalidationSequence(long sequence) |
void |
setPartitionId(int partitionId) |
void |
setUuid(UUID uuid) |
void |
setValue(V value)
Sets the value of this
NearCacheRecord . |
getExpirationTime, isExpiredAt, setExpirationTime
getAccessHit, getCreationTime, getLastAccessTime, getValue
static final int TIME_NOT_SET
static final long NOT_RESERVED
static final long RESERVED
static final long UPDATE_STARTED
static final long READ_PERMITTED
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
by 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
long getRecordState()
boolean casRecordState(long expect, long update)
expect
- expected valueupdate
- updated valuetrue
if successful. False return indicates that
the actual value was not equal to the expected value.int getPartitionId()
void setPartitionId(int partitionId)
partitionId
- the partition ID of this recordlong getInvalidationSequence()
void setInvalidationSequence(long sequence)
sequence
- last known invalidation sequence at time of this records' creationvoid setUuid(UUID uuid)
uuid
- last known UUID of invalidation source at time of this records' creationboolean hasSameUuid(UUID uuid)
true
if supplied UUID equals existing one, otherwise and when one of supplied
or existing is null returns false
Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.