public class SharePartition extends Object
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Optional<Throwable>> |
acknowledge(String memberId,
List<org.apache.kafka.server.share.ShareAcknowledgementBatch> acknowledgementBatch)
Acknowledge the fetched records for the share partition.
|
CompletableFuture<List<org.apache.kafka.common.message.ShareFetchResponseData.AcquiredRecords>> |
acquire(String memberId,
org.apache.kafka.storage.internals.log.FetchPartitionData fetchPartitionData)
Acquire the fetched records for the share partition.
|
long |
nextFetchOffset()
The next fetch offset is used to determine the next offset that should be fetched from the leader.
|
CompletableFuture<Optional<Throwable>> |
releaseAcquiredRecords(String memberId)
Release the acquired records for the share partition.
|
public long nextFetchOffset()
public CompletableFuture<List<org.apache.kafka.common.message.ShareFetchResponseData.AcquiredRecords>> acquire(String memberId, org.apache.kafka.storage.internals.log.FetchPartitionData fetchPartitionData)
memberId
- The member id of the client that is fetching the record.fetchPartitionData
- The fetched records for the share partition.public CompletableFuture<Optional<Throwable>> acknowledge(String memberId, List<org.apache.kafka.server.share.ShareAcknowledgementBatch> acknowledgementBatch)
memberId
- The member id of the client that is fetching the record.acknowledgementBatch
- The acknowledgement batch list for the share partition.public CompletableFuture<Optional<Throwable>> releaseAcquiredRecords(String memberId)
memberId
- The member id of the client whose records shall be released.