java.lang.Object
com.hazelcast.hibernate.serialization.Expirable
com.hazelcast.hibernate.serialization.Value
- All Implemented Interfaces:
com.hazelcast.nio.serialization.DataSerializable,com.hazelcast.nio.serialization.IdentifiedDataSerializable
A value within a region cache
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintintlonggetValue()getValue(long txTimestamp) inthashCode()booleanisReplaceableBy(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.markForExpiration(long timeout, String nextMarkerId) Mark the entry for expiration with the given timeout and marker id.booleanmatches(ExpiryMarker lock) voidreadData(com.hazelcast.nio.ObjectDataInput in) voidwriteData(com.hazelcast.nio.ObjectDataOutput out) Methods inherited from class com.hazelcast.hibernate.serialization.Expirable
getVersion
-
Constructor Details
-
Value
public Value() -
Value
-
-
Method Details
-
isReplaceableBy
Description copied from class:ExpirableDetermine if the current entry can be overridden with a value corresponding to the given new version and the transaction timestamp.- Specified by:
isReplaceableByin classExpirable- Parameters:
txTimestamp- the timestamp of the transactionnewVersion- the new version for the replacement valueversionComparator- the comparator to use for the version- Returns:
trueif the value can be replaced,falseotherwise
-
getTimestamp
public long getTimestamp() -
getValue
-
getValue
-
matches
-
markForExpiration
Description copied from class:ExpirableMark the entry for expiration with the given timeout and marker id. For every invocation a corresponding call toExpiryMarker.expire(long)should be made, provided that the returned markerExpirable.matches(ExpiryMarker)- Specified by:
markForExpirationin classExpirable- Parameters:
timeout- the timestamp in which the lock times outnextMarkerId- the next lock id to use if creating a new lock- Returns:
- the newly created marker, or the current marker with a higher multiplicity
- See Also:
-
readData
- Specified by:
readDatain interfacecom.hazelcast.nio.serialization.DataSerializable- Overrides:
readDatain classExpirable- Throws:
IOException
-
writeData
- Specified by:
writeDatain interfacecom.hazelcast.nio.serialization.DataSerializable- Overrides:
writeDatain classExpirable- Throws:
IOException
-
getFactoryId
public int getFactoryId() -
getClassId
public int getClassId() -
equals
-
hashCode
public int hashCode()
-