public static class FileTierPartitionState.MaterializationListener.Initialization extends Object implements FileTierPartitionState.MaterializationListener
FileTierPartitionState.MaterializationListener.Initialization, FileTierPartitionState.MaterializationListener.LeaderEpoch, FileTierPartitionState.MaterializationListener.ReplicationTargetObjectId, FileTierPartitionState.MaterializationListener.ReplicationTargetOffset
Constructor and Description |
---|
Initialization(org.slf4j.Logger log,
TopicIdPartition topicIdPartition,
CompletableFuture<Boolean> promise,
int leaderEpochToMaterialize) |
Modifier and Type | Method and Description |
---|---|
void |
cancel(Exception e)
Complete this MaterializationListener without a result.
|
boolean |
complete(FileTierPartitionState.State flushedState)
Try to complete this listener.
|
boolean |
mayComplete(FileTierPartitionState.State unflushedState,
Optional<AbstractTierMetadata> unflushedMessage)
Observe the unflushed FileTierPartitionState.State to determine if this listener can be completed after a flush.
|
String |
toString() |
public Initialization(org.slf4j.Logger log, TopicIdPartition topicIdPartition, CompletableFuture<Boolean> promise, int leaderEpochToMaterialize)
public boolean mayComplete(FileTierPartitionState.State unflushedState, Optional<AbstractTierMetadata> unflushedMessage)
FileTierPartitionState.MaterializationListener
mayComplete
in interface FileTierPartitionState.MaterializationListener
unflushedState
- The unflushed TierPartitionState.StateunflushedMessage
- 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(FileTierPartitionState.State flushedState)
FileTierPartitionState.MaterializationListener
complete
in interface FileTierPartitionState.MaterializationListener
flushedState
- The flushed TierPartitionState.State.public void cancel(Exception e)
FileTierPartitionState.MaterializationListener
cancel
in interface FileTierPartitionState.MaterializationListener