Package io.pravega.client.tables.impl
Class TableSegmentKey
- java.lang.Object
-
- io.pravega.client.tables.impl.TableSegmentKey
-
public class TableSegmentKey extends java.lang.ObjectKey for aTableSegment.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull io.netty.buffer.ByteBufgetKey()AByteBufrepresenting the contents of this Key.@NonNull TableSegmentKeyVersiongetVersion()ATableSegmentKeyVersionrepresenting the Version of this Key.static TableSegmentKeynotExists(byte[] key)Creates a newTableSegmentKeywith a version that indicates the key must not exist.static TableSegmentKeynotExists(io.netty.buffer.ByteBuf key)Creates a newTableSegmentKeywith a version that indicates the key must not exist.static TableSegmentKeyunversioned(byte[] key)Creates a newTableSegmentKeywith no specific version.static TableSegmentKeyunversioned(io.netty.buffer.ByteBuf key)Creates a newTableSegmentKeywith no specific version.static TableSegmentKeyversioned(byte[] key, long version)Creates a newTableSegmentKeywith a specific version.static TableSegmentKeyversioned(io.netty.buffer.ByteBuf key, long version)Creates a newTableSegmentKeywith a specific version.
-
-
-
Method Detail
-
unversioned
public static TableSegmentKey unversioned(io.netty.buffer.ByteBuf key)
Creates a newTableSegmentKeywith no specific version.- Parameters:
key- AByteBufrepresenting the key.- Returns:
- An unversioned
TableSegmentKey.
-
unversioned
public static TableSegmentKey unversioned(byte[] key)
Creates a newTableSegmentKeywith no specific version.- Parameters:
key- A byte array representing the key. This will be wrapped in aByteBuf.- Returns:
- An unversioned
TableSegmentKey.
-
versioned
public static TableSegmentKey versioned(io.netty.buffer.ByteBuf key, long version)
Creates a newTableSegmentKeywith a specific version.- Parameters:
key- AByteBufrepresenting the key.version- The version to set.- Returns:
- An versioned
TableSegmentKey.
-
versioned
public static TableSegmentKey versioned(byte[] key, long version)
Creates a newTableSegmentKeywith a specific version.- Parameters:
key- A byte array representing the key. This will be wrapped in aByteBuf.version- The version to set.- Returns:
- An versioned
TableSegmentKey.
-
notExists
public static TableSegmentKey notExists(io.netty.buffer.ByteBuf key)
Creates a newTableSegmentKeywith a version that indicates the key must not exist.- Parameters:
key- AByteBufrepresenting the key.- Returns:
- An
TableSegmentKeywith a version set toTableSegmentKeyVersion.NOT_EXISTS.
-
notExists
public static TableSegmentKey notExists(byte[] key)
Creates a newTableSegmentKeywith a version that indicates the key must not exist.- Parameters:
key- A byte array representing the key. This will be wrapped in aByteBuf.- Returns:
- An
TableSegmentKeywith a version set toTableSegmentKeyVersion.NOT_EXISTS.
-
getKey
@NonNull public @NonNull io.netty.buffer.ByteBuf getKey()
AByteBufrepresenting the contents of this Key.
-
getVersion
@NonNull public @NonNull TableSegmentKeyVersion getVersion()
ATableSegmentKeyVersionrepresenting the Version of this Key.
-
-