public class ExpiryMarker extends Expirable implements Serializable
matches is true| Constructor and Description |
|---|
ExpiryMarker() |
ExpiryMarker(Object version,
long timeout,
String markerId) |
| Modifier and Type | Method and Description |
|---|---|
ExpiryMarker |
expire(long timestamp)
Expire the marker.
|
int |
getFactoryId()
Returns DataSerializableFactory factory id for this class.
|
int |
getId()
Returns type identifier for this class.
|
Object |
getValue() |
Object |
getValue(long txTimestamp) |
boolean |
isConcurrent() |
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 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 otherwiseexpire(long)public boolean isConcurrent()
true if the marker has ever been markForExpiration(long, String)
concurrently, false otherwisepublic ExpiryMarker markForExpiration(long timeout, String nextMarkerId)
Expirableexpire(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 lockexpire(long)public ExpiryMarker expire(long timestamp)
replaceable.timestamp - the timestamp to specify when it was completely expiredExpiryMarkerpublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializablewriteData in class Expirableout - outputIOExceptionpublic void readData(ObjectDataInput in) throws IOException
DataSerializablereadData in interface DataSerializablereadData in class Expirablein - inputIOExceptionpublic int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic int getId()
IdentifiedDataSerializablegetId in interface IdentifiedDataSerializableCopyright © 2016 Hazelcast, Inc.. All Rights Reserved.