public abstract class AbstractTierMetadata extends Object
Modifier and Type | Field and Description |
---|---|
protected long |
timestamp |
Constructor and Description |
---|
AbstractTierMetadata() |
Modifier and Type | Method and Description |
---|---|
static Optional<AbstractTierMetadata> |
deserialize(byte[] key,
byte[] value,
long timestamp)
Deserializes byte key and value read from Tier State Topic into Tier Metadata.
|
static Optional<AbstractTierMetadata> |
deserialize(ByteBuffer key,
ByteBuffer value,
long timestamp) |
static TopicIdPartition |
deserializeKey(byte[] key) |
static TopicIdPartition |
deserializeKey(ByteBuffer key) |
boolean |
equals(Object o) |
static byte |
getTypeId(byte[] value)
Deserializes just the type from a value read from a Tier State Topic
|
int |
hashCode() |
abstract UUID |
messageId()
Get a unique id for this message.
|
String |
messageIdAsBase64()
Encode messageId with Base64
|
abstract ByteBuffer |
payloadBuffer() |
byte[] |
serializeKey() |
byte[] |
serializeValue() |
abstract OffsetAndEpoch |
stateOffsetAndEpoch()
The lastMaterializedOffsetAndEpoch for the tier partition state at the time this metadata was generated.
|
abstract int |
tierEpoch()
tierEpoch for the tier metadata
|
long |
timestamp()
Get the associated record timestamp in millisecond unit.
|
abstract TopicIdPartition |
topicIdPartition()
Topic-partition corresponding to this tier metadata.
|
abstract TierRecordType |
type() |
public byte[] serializeKey()
public byte[] serializeValue()
public static byte getTypeId(byte[] value)
value
- value bytespublic static TopicIdPartition deserializeKey(byte[] key)
public static TopicIdPartition deserializeKey(ByteBuffer key)
public static Optional<AbstractTierMetadata> deserialize(byte[] key, byte[] value, long timestamp) throws TierMetadataDeserializationException
key
- Key containing archived topic partitionvalue
- Value containing tier metadata.timestamp
- The record timestamp associated with this tier metadataTierMetadataDeserializationException
public static Optional<AbstractTierMetadata> deserialize(ByteBuffer key, ByteBuffer value, long timestamp) throws TierMetadataDeserializationException
public abstract TierRecordType type()
public abstract TopicIdPartition topicIdPartition()
public abstract ByteBuffer payloadBuffer()
public abstract int tierEpoch()
public abstract UUID messageId()
public abstract OffsetAndEpoch stateOffsetAndEpoch()
public long timestamp()
public String messageIdAsBase64()