Package io.pravega.client.tables.impl
Class TableSegmentKeyVersion
- java.lang.Object
-
- io.pravega.client.tables.impl.TableSegmentKeyVersion
-
- All Implemented Interfaces:
java.io.Serializable
public class TableSegmentKeyVersion extends java.lang.Object implements java.io.SerializableKey Version forTableSegmentKeys.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static TableSegmentKeyVersionNO_VERSIONA special KeyVersion which indicates that no versioning is required.static TableSegmentKeyVersionNOT_EXISTSA special KeyVersion which indicates the Key must not exist when performing Conditional Updates.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static io.pravega.client.tables.impl.TableSegmentKeyVersion.TableSegmentKeyVersionBuilderbuilder()protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)static TableSegmentKeyVersionfrom(long segmentVersion)Creates a newTableSegmentKeyVersionfrom the given value, or returnsNO_VERSIONorNOT_EXISTSif the given value is a special version.static TableSegmentKeyVersionfromBytes(java.nio.ByteBuffer serializedKeyVersion)Deserializes the KeyVersion from its serialized form obtained from callingtoBytes().longgetSegmentVersion()inthashCode()java.nio.ByteBuffertoBytes()
-
-
-
Field Detail
-
NOT_EXISTS
public static final TableSegmentKeyVersion NOT_EXISTS
A special KeyVersion which indicates the Key must not exist when performing Conditional Updates.
-
NO_VERSION
public static final TableSegmentKeyVersion NO_VERSION
A special KeyVersion which indicates that no versioning is required.
-
-
Method Detail
-
from
public static TableSegmentKeyVersion from(long segmentVersion)
Creates a newTableSegmentKeyVersionfrom the given value, or returnsNO_VERSIONorNOT_EXISTSif the given value is a special version.- Parameters:
segmentVersion- The segment version to wrap.- Returns:
- A
TableSegmentKeyVersioninstance.
-
toBytes
public java.nio.ByteBuffer toBytes()
-
fromBytes
public static TableSegmentKeyVersion fromBytes(java.nio.ByteBuffer serializedKeyVersion)
Deserializes the KeyVersion from its serialized form obtained from callingtoBytes().- Parameters:
serializedKeyVersion- A serialized TableSegmentKeyVersion.- Returns:
- The KeyVersion object.
-
builder
public static io.pravega.client.tables.impl.TableSegmentKeyVersion.TableSegmentKeyVersionBuilder builder()
-
getSegmentVersion
public long getSegmentVersion()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-