@Stable public interface CommitLogReader
| Modifier and Type | Interface and Description |
|---|---|
static interface |
CommitLogReader.Factory<T extends CommitLogReader>
Serializable factory for CommitLogReader. |
| Modifier and Type | Method and Description |
|---|---|
CommitLogReader.Factory<?> |
asFactory()
Convert instance of this reader to
CommitLogReader.Factory suitable for serialization. |
java.util.List<Partition> |
getPartitions()
Retrieve list of partitions of this commit log.
|
java.net.URI |
getUri()
Retrieve URI representing this resource.
|
default boolean |
hasExternalizableOffsets()
Signals the user that offsets used by this reader can be externalized and reused later.
|
default ObserveHandle |
observe(java.lang.String name,
LogObserver observer)
Subscribe observer by name to the commit log and read the newest data.
|
ObserveHandle |
observe(java.lang.String name,
Position position,
LogObserver observer)
Subscribe observer by name to the commit log.
|
default ObserveHandle |
observeBulk(java.lang.String name,
LogObserver observer)
Subscribe to the commit log in a bulk fashion from newest data.
|
ObserveHandle |
observeBulk(java.lang.String name,
Position position,
boolean stopAtCurrent,
LogObserver observer)
Subscribe to the commit log in a bulk fashion.
|
default ObserveHandle |
observeBulk(java.lang.String name,
Position position,
LogObserver observer)
Subscribe to the commit log in a bulk fashion.
|
ObserveHandle |
observeBulkOffsets(java.util.Collection<Offset> offsets,
boolean stopAtCurrent,
LogObserver observer)
Consume from given offsets in a bulk fashion.
|
default ObserveHandle |
observeBulkOffsets(java.util.Collection<Offset> offsets,
LogObserver observer)
Consume from given offsets in a bulk fashion.
|
default ObserveHandle |
observeBulkPartitions(java.util.Collection<Partition> partitions,
Position position,
boolean stopAtCurrent,
LogObserver observer)
Subscribe to given partitions in a bulk fashion.
|
default ObserveHandle |
observeBulkPartitions(java.util.Collection<Partition> partitions,
Position position,
LogObserver observer)
Subscribe to given partitions in a bulk fashion.
|
ObserveHandle |
observeBulkPartitions(java.lang.String name,
java.util.Collection<Partition> partitions,
Position position,
boolean stopAtCurrent,
LogObserver observer)
Subscribe to given partitions in a bulk fashion.
|
default ObserveHandle |
observeBulkPartitions(java.lang.String name,
java.util.Collection<Partition> partitions,
Position position,
LogObserver observer)
Subscribe to given partitions in a bulk fashion.
|
default ObserveHandle |
observePartitions(java.util.Collection<Partition> partitions,
LogObserver observer)
Subscribe to given set of partitions and read newest data.
|
default ObserveHandle |
observePartitions(java.util.Collection<Partition> partitions,
Position position,
boolean stopAtCurrent,
LogObserver observer)
Subscribe to given set of partitions.
|
default ObserveHandle |
observePartitions(java.util.Collection<Partition> partitions,
Position position,
LogObserver observer)
Subscribe to given set of partitions.
|
ObserveHandle |
observePartitions(java.lang.String name,
java.util.Collection<Partition> partitions,
Position position,
boolean stopAtCurrent,
LogObserver observer)
Subscribe to given set of partitions.
|
java.net.URI getUri()
java.util.List<Partition> getPartitions()
ObserveHandle observe(java.lang.String name, Position position, LogObserver observer)
name - identifier of the consumerposition - the position to seek for in the commit logobserver - the observer to subscribe to the commit logObserveHandle to asynchronously cancel the observationdefault ObserveHandle observe(java.lang.String name, LogObserver observer)
name - identifier of the consumerobserver - the observer to subscribe to the commit logObserveHandle to asynchronously cancel the observationObserveHandle observePartitions(java.lang.String name, java.util.Collection<Partition> partitions, Position position, boolean stopAtCurrent, LogObserver observer)
name - name of the observerpartitions - the list of partitions to subscribe toposition - the position to seek to in the partitionsstopAtCurrent - when true then stop the observer as soon as it reaches most recent
recordobserver - the observer to subscribe to the partitionsObserveHandle to asynchronously cancel the observationdefault ObserveHandle observePartitions(java.util.Collection<Partition> partitions, Position position, boolean stopAtCurrent, LogObserver observer)
partitions - the list of partitions to subscribe toposition - the position to seek to in the partitionsstopAtCurrent - when true then stop the observer as soon as it reaches most recent
recordobserver - the observer to subscribe to the partitionsObserveHandle to asynchronously cancel the observationdefault ObserveHandle observePartitions(java.util.Collection<Partition> partitions, Position position, LogObserver observer)
partitions - the list of partitions to subscribe toposition - the position to seek to in the partitionsobserver - the observer to subscribe to the partitionsObserveHandle to asynchronously cancel the observationdefault ObserveHandle observePartitions(java.util.Collection<Partition> partitions, LogObserver observer)
partitions - the partitions to subscribe toobserver - the observer to subscribe to the given partitionsObserveHandle to asynchronously cancel the observationObserveHandle observeBulk(java.lang.String name, Position position, boolean stopAtCurrent, LogObserver observer)
name - name of the observerposition - the position to seek to in the partitionsstopAtCurrent - when true then stop the observer as soon as it reaches most recent
recordobserver - the observer to subscribeObserveHandle to asynchronously cancel the observationdefault ObserveHandle observeBulk(java.lang.String name, Position position, LogObserver observer)
name - name of the observerposition - the position to seek to in the partitionsobserver - the observer to subscribeObserveHandle to asynchronously cancel the observationdefault ObserveHandle observeBulk(java.lang.String name, LogObserver observer)
name - name of the observerobserver - the observer to subscribeObserveHandle to asynchronously cancel the observationdefault ObserveHandle observeBulkPartitions(java.lang.String name, java.util.Collection<Partition> partitions, Position position, LogObserver observer)
name - name of the observerpartitions - the partitions to subscribe toposition - the position to seek to in the partitionsobserver - the observer to subscribe to the partitionsObserveHandle to asynchronously cancel the observationObserveHandle observeBulkPartitions(java.lang.String name, java.util.Collection<Partition> partitions, Position position, boolean stopAtCurrent, LogObserver observer)
name - name of the observerpartitions - the partitions to subscribe toposition - the position to seek to in the partitionsstopAtCurrent - when true then stop the observer as soon as it reaches most recent
recordobserver - the observer to subscribe to the partitionsObserveHandle to asynchronously cancel the observationdefault ObserveHandle observeBulkPartitions(java.util.Collection<Partition> partitions, Position position, boolean stopAtCurrent, LogObserver observer)
partitions - the partitions to subscribe toposition - the position to seek to in the partitionsstopAtCurrent - when true then stop the observer as soon as it reaches most recent
recordobserver - the observer to subscribe to the partitionsObserveHandle to asynchronously cancel the observationdefault ObserveHandle observeBulkPartitions(java.util.Collection<Partition> partitions, Position position, LogObserver observer)
partitions - the partitions to subscribe toposition - the position to seek to in the partitionsobserver - the observer to subscribe to the partitionsObserveHandle to asynchronously cancel the observationdefault ObserveHandle observeBulkOffsets(java.util.Collection<Offset> offsets, LogObserver observer)
observeBulkPartitions(java.lang.String, java.util.Collection<cz.o2.proxima.storage.Partition>, cz.o2.proxima.storage.commitlog.Position, cz.o2.proxima.direct.commitlog.LogObserver), observe for some time, than
interrupt the consumption, store associated offsets and resume the consumption from these
offsets lateroffsets - the @{link Offset}s to subscribe toobserver - the observer to subscribe to the offsetsObserveHandle to asynchronously cancel the observationObserveHandle observeBulkOffsets(java.util.Collection<Offset> offsets, boolean stopAtCurrent, LogObserver observer)
observeBulkPartitions(java.lang.String, java.util.Collection<cz.o2.proxima.storage.Partition>, cz.o2.proxima.storage.commitlog.Position, cz.o2.proxima.direct.commitlog.LogObserver), observe for some time, than
interrupt the consumption, store associated offsets and resume the consumption from these
offsets lateroffsets - the @{link Offset}s to subscribe tostopAtCurrent - true if the processing should stop at current offsetsobserver - the observer to subscribe to the offsetsObserveHandle to asynchronously cancel the observationdefault boolean hasExternalizableOffsets()
true if Offsets of this reader are externalizableCommitLogReader.Factory<?> asFactory()
CommitLogReader.Factory suitable for serialization.CommitLogReader.Factory representing this readerCopyright © 2017–2021. All rights reserved.