public class ExpiryMarker extends Expirable implements Serializable
matches(ExpiryMarker) 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() |
int |
getId() |
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(com.hazelcast.nio.ObjectDataInput in) |
void |
writeData(com.hazelcast.nio.ObjectDataOutput out) |
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 Expirable.matches(ExpiryMarker)markForExpiration 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(com.hazelcast.nio.ObjectDataOutput out)
throws IOException
writeData in interface com.hazelcast.nio.serialization.DataSerializablewriteData in class ExpirableIOExceptionpublic void readData(com.hazelcast.nio.ObjectDataInput in)
throws IOException
readData in interface com.hazelcast.nio.serialization.DataSerializablereadData in class ExpirableIOExceptionpublic int getFactoryId()
getFactoryId in interface com.hazelcast.nio.serialization.IdentifiedDataSerializablepublic int getId()
getId in interface com.hazelcast.nio.serialization.IdentifiedDataSerializableCopyright © 2018. All Rights Reserved.