public class TierStateFetcher
extends java.lang.Object
Constructor and Description |
---|
TierStateFetcher(java.lang.Integer numThreads,
TierObjectStore tierObjectStore) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.util.concurrent.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.
|
java.util.concurrent.CompletableFuture<java.nio.ByteBuffer> |
fetchProducerStateSnapshotAsync(TierObjectStore.ObjectMetadata metadata) |
java.nio.ByteBuffer |
fetchRecoverSnapshot(TierObjectStore.TierStateRestoreSnapshotMetadata metadata) |
static byte[] |
toArray(java.io.InputStream inputStream)
Read the input stream from its current position to its limit into a byte array.
|
public TierStateFetcher(java.lang.Integer numThreads, TierObjectStore tierObjectStore)
public void close()
public java.util.concurrent.CompletableFuture<scala.collection.immutable.List<kafka.server.epoch.EpochEntry>> fetchLeaderEpochStateAsync(TierObjectStore.ObjectMetadata metadata)
metadata
- the tier object metadata for this tier state.public java.util.concurrent.CompletableFuture<java.nio.ByteBuffer> fetchProducerStateSnapshotAsync(TierObjectStore.ObjectMetadata metadata)
public java.nio.ByteBuffer fetchRecoverSnapshot(TierObjectStore.TierStateRestoreSnapshotMetadata metadata) throws java.io.IOException
java.io.IOException
public static byte[] toArray(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- The inputStream to read fromjava.io.IOException