public static class FileTierPartitionState.MaterializationListener.LeaderEpoch extends Object implements FileTierPartitionState.MaterializationListener
FileTierPartitionState.MaterializationListener.Initialization, FileTierPartitionState.MaterializationListener.LeaderEpoch, FileTierPartitionState.MaterializationListener.ReplicationTargetObjectId, FileTierPartitionState.MaterializationListener.ReplicationTargetOffset| Constructor and Description |
|---|
LeaderEpoch(org.slf4j.Logger log,
TopicIdPartition topicIdPartition,
CompletableFuture<Optional<kafka.log.TierLogSegment>> promise,
int leaderEpochToMaterialize) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(Exception e)
Complete this MaterializationListener without a result.
|
boolean |
complete(kafka.tier.state.FileTierPartitionState.State flushedState)
Try to complete this listener.
|
boolean |
mayComplete(kafka.tier.state.FileTierPartitionState.State unflushedState,
Optional<AbstractTierMetadata> ignored)
Observe the unflushed FileTierPartitionState.State to determine if this listener can be completed after a flush.
|
String |
toString() |
public LeaderEpoch(org.slf4j.Logger log,
TopicIdPartition topicIdPartition,
CompletableFuture<Optional<kafka.log.TierLogSegment>> promise,
int leaderEpochToMaterialize)
public boolean mayComplete(kafka.tier.state.FileTierPartitionState.State unflushedState,
Optional<AbstractTierMetadata> ignored)
FileTierPartitionState.MaterializationListenermayComplete in interface FileTierPartitionState.MaterializationListenerunflushedState - The unflushed TierPartitionState.Stateignored - Optionally, an unflushed message which has mutated the provided FileTierPartitionState.State.
This is sometimes useful for situations where it is expensive to query the unflushedState, but
a cheaper check is possible by observing the most recently applied AbstractTierMetadata.public boolean complete(kafka.tier.state.FileTierPartitionState.State flushedState)
throws IOException
FileTierPartitionState.MaterializationListenercomplete in interface FileTierPartitionState.MaterializationListenerflushedState - The flushed TierPartitionState.State.IOExceptionpublic void cancel(Exception e)
FileTierPartitionState.MaterializationListenercancel in interface FileTierPartitionState.MaterializationListener