public class TierStateFetcher extends Object
Constructor and Description |
---|
TierStateFetcher(Integer numThreads,
TierObjectStore tierObjectStore) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
CompletableFuture<scala.collection.immutable.List<kafka.server.epoch.EpochEntry>> |
fetchLeaderEpochStateAsync(TierObjectStore.ObjectMetadata metadata)
Send a request to the tier state fetcher executor, returning a future that will be
completed when the request has read the tier state from the object store.
|
CompletableFuture<ByteBuffer> |
fetchProducerStateSnapshotAsync(TierObjectStore.ObjectMetadata metadata) |
ByteBuffer |
fetchRecoverSnapshot(TierObjectStore.TierStateRestoreSnapshotMetadata metadata) |
static byte[] |
toArray(InputStream inputStream)
Read the input stream from its current position to its limit into a byte array.
|
public TierStateFetcher(Integer numThreads, TierObjectStore tierObjectStore)
public void close()
public CompletableFuture<scala.collection.immutable.List<kafka.server.epoch.EpochEntry>> fetchLeaderEpochStateAsync(TierObjectStore.ObjectMetadata metadata)
metadata
- the tier object metadata for this tier state.public CompletableFuture<ByteBuffer> fetchProducerStateSnapshotAsync(TierObjectStore.ObjectMetadata metadata)
public ByteBuffer fetchRecoverSnapshot(TierObjectStore.TierStateRestoreSnapshotMetadata metadata) throws IOException
IOException
public static byte[] toArray(InputStream inputStream) throws IOException
inputStream
- The inputStream to read fromIOException