public interface LogTailer<M extends Externalizable> extends AutoCloseable
Modifier and Type | Method and Description |
---|---|
Collection<LogPartition> |
assignments()
Returns the list of Log name, partitions tuples currently assigned to this tailer.
|
void |
close() |
boolean |
closed()
Returns
true if the tailer has been closed. |
void |
commit()
Commit current positions for all partitions (last message offset returned by read).
|
LogOffset |
commit(LogPartition partition)
Commit current position for the partition.
|
String |
group()
Returns the consumer group.
|
LogRecord<M> |
read(Duration timeout)
Read a message from assigned partitions within the timeout.
|
void |
reset()
Reset all committed positions for this group, next read will be done from beginning.
|
void |
reset(LogPartition partition)
Reset the committed position for this group on this partition, next read for this partition will be done from the
beginning.
|
void |
seek(LogOffset offset)
Set the current position for a single partition.
|
void |
toEnd()
Set the current positions to the end of all partitions.
|
void |
toLastCommitted()
Set the current positions to previously committed positions.
|
void |
toStart()
Set the current positions to the beginning of all partitions.
|
Collection<LogPartition> assignments()
LogManager.subscribe(java.lang.String, java.util.Collection<java.lang.String>, org.nuxeo.lib.stream.log.RebalanceListener)
.LogRecord<M> read(Duration timeout) throws InterruptedException
RebalanceException
- if a partition rebalancing happen during the read, this is possible only when using
LogManager.subscribe(java.lang.String, java.util.Collection<java.lang.String>, org.nuxeo.lib.stream.log.RebalanceListener)
.InterruptedException
void commit()
LogOffset commit(LogPartition partition)
void toEnd()
void toStart()
void toLastCommitted()
void seek(LogOffset offset)
void reset()
void reset(LogPartition partition)
void close()
close
in interface AutoCloseable
boolean closed()
true
if the tailer has been closed.Copyright © 2018 Nuxeo. All rights reserved.