public interface AsyncReader
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
init()
Initialize reading in the background.
|
CompletableFuture<Void> |
shutdown()
Stops internal threads and makes cleanup in background.
|
CompletableFuture<Status> |
updateOffsetsInTransaction(YdbTransaction transaction,
Map<String,List<PartitionOffsets>> offsets,
UpdateOffsetsInTransactionSettings settings)
Add offsets to transaction.
|
default CompletableFuture<Status> |
updateOffsetsInTransaction(YdbTransaction transaction,
PartitionOffsets offsets,
UpdateOffsetsInTransactionSettings settings)
Add offsets of a single partition session to transaction.Offsets could be from several topics.
|
CompletableFuture<Void> init()
CompletableFuture<Void> shutdown()
CompletableFuture<Status> updateOffsetsInTransaction(YdbTransaction transaction, Map<String,List<PartitionOffsets>> offsets, UpdateOffsetsInTransactionSettings settings)
transaction - a YdbTransaction that offsets should be added to.
Transaction has to be active.offsets - Offsets that should be added to transaction.
Map key: topic Path
Map value: List of Partition ranges for every partition in this topic to addsettings - Operation settings.CompletableFuture to operation status@ExperimentalApi(value="New transaction interfaces are experimental and may change without notice") default CompletableFuture<Status> updateOffsetsInTransaction(YdbTransaction transaction, PartitionOffsets offsets, UpdateOffsetsInTransactionSettings settings)
transaction - a YdbTransaction that offsets should be added to.
Transaction has to be active.offsets - Offsets that should be added to transaction.
Could be constructed with helper methods Message.getPartitionOffsets()
or DataReceivedEvent.getPartitionOffsets()settings - Operation settings.CompletableFuture to operation statusCopyright © 2024. All rights reserved.