public static interface TierTopicConsumer.ClientCtx
Modifier and Type | Method and Description |
---|---|
void |
beginCatchup()
Begin
TierPartitionStatus.CATCHUP phase for this context. |
void |
beginDiscover()
Begin
TierPartitionStatus.DISCOVER phase for this context. |
void |
completeCatchup()
Complete catchup phase for this context and transition to
TierPartitionStatus.ONLINE status. |
void |
completeDiscover()
Complete discover phase for this context and transition to
TierPartitionStatus.CATCHUP status. |
String |
id() |
long |
localMaterializedOffset()
Retrieve offset for the tier state topic partition of the latest materialized message
|
default long |
materializationLag()
Retrieve lag of tiered partition.
|
TierPartitionState.AppendResult |
process(AbstractTierMetadata metadata,
OffsetAndEpoch sourceOffsetAndEpoch)
Process metadata for this context.
|
TierPartitionState.RestoreResult |
processRestoreEvents(AbstractTierMetadata metadata,
TierPartitionStatus targetStatus,
OffsetAndEpoch sourceOffsetAndEpoch,
Optional<ByteBuffer> targetStateOpt)
Process restore events for this context
|
TierPartitionState.RestoreResult |
processSnapshotMaterializationEvent(TierMetadataSnapshotUploadComplete metadata,
ByteBuffer snapshotBuffer,
TierPartitionStatus targetStatus,
OffsetAndEpoch offsetAndEpoch)
Process snapshot materialization event for this context
|
TierPartitionStatus |
status()
Retrieve status of tiered partition.
|
String id()
TierPartitionState.AppendResult process(AbstractTierMetadata metadata, OffsetAndEpoch sourceOffsetAndEpoch)
metadata
- Metadata to processsourceOffsetAndEpoch
- Offset and epoch corresponding to metadata to processTierPartitionState.RestoreResult processRestoreEvents(AbstractTierMetadata metadata, TierPartitionStatus targetStatus, OffsetAndEpoch sourceOffsetAndEpoch, Optional<ByteBuffer> targetStateOpt)
metadata
- TierPartitionForceRestore or TierPartitionUnfreezeLogStartOffset event being restoredtargetStatus
- TierPartitionStatus to restore the TierPartitionState atsourceOffsetAndEpoch
- Offset and epoch corresponding to metadata to processtargetStateOpt
- buffer containing the TierPartitionState contents to recoverTierPartitionState.RestoreResult processSnapshotMaterializationEvent(TierMetadataSnapshotUploadComplete metadata, ByteBuffer snapshotBuffer, TierPartitionStatus targetStatus, OffsetAndEpoch offsetAndEpoch)
metadata
- TierMetadataSnapshotUploadComplete event being restoredsnapshotBuffer
- buffer containing the TierPartitionState snapshot contents to recovertargetStatus
- TierPartitionStatus to restore the TierPartitionState atoffsetAndEpoch
- Offset and epoch corresponding to metadata to processTierPartitionStatus status()
default long materializationLag()
long localMaterializedOffset()
void beginCatchup()
TierPartitionStatus.CATCHUP
phase for this context.void completeCatchup()
TierPartitionStatus.ONLINE
status.void beginDiscover()
TierPartitionStatus.DISCOVER
phase for this context.void completeDiscover()
TierPartitionStatus.CATCHUP
status.