public class Value extends Expirable
| Constructor and Description |
|---|
Value() |
Value(Object version,
long timestamp,
Object value) |
| Modifier and Type | Method and Description |
|---|---|
int |
getFactoryId()
Returns DataSerializableFactory factory id for this class.
|
int |
getId()
Returns type identifier for this class.
|
long |
getTimestamp() |
Object |
getValue() |
Object |
getValue(long txTimestamp) |
boolean |
isReplaceableBy(long txTimestamp,
Object newVersion,
Comparator versionComparator)
Determine if the current entry can be overridden with a value corresponding to the given new version
and the transaction timestamp.
|
ExpiryMarker |
markForExpiration(long timeout,
String nextMarkerId)
Mark the entry for expiration with the given timeout and marker id.
|
boolean |
matches(ExpiryMarker lock) |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
getVersionpublic boolean isReplaceableBy(long txTimestamp,
Object newVersion,
Comparator versionComparator)
ExpirableisReplaceableBy in class ExpirabletxTimestamp - the timestamp of the transactionnewVersion - the new version for the replacement valueversionComparator - the comparator to use for the versiontrue if the value can be replaced, false otherwisepublic long getTimestamp()
public Object getValue()
public Object getValue(long txTimestamp)
public boolean matches(ExpiryMarker lock)
matches in class Expirabletrue if the Expirable matches using the specified lock, false otherwiseExpiryMarker.expire(long)public ExpiryMarker markForExpiration(long timeout, String nextMarkerId)
ExpirableExpiryMarker.expire(long) should be made, provided that
the returned marker matchesmarkForExpiration in class Expirabletimeout - the timestamp in which the lock times outnextMarkerId - the next lock id to use if creating a new lockExpiryMarker.expire(long)public void readData(ObjectDataInput in) throws IOException
DataSerializablereadData in interface DataSerializablereadData in class Expirablein - inputIOExceptionpublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializablewriteData in class Expirableout - outputIOExceptionpublic int getFactoryId()
IdentifiedDataSerializablepublic int getId()
IdentifiedDataSerializableCopyright © 2016 Hazelcast, Inc.. All Rights Reserved.