public class ChronicleCompoundLogTailer<M extends Externalizable> extends Object implements LogTailer<M>
Modifier and Type | Field and Description |
---|---|
protected boolean |
closed |
protected long |
counter |
protected String |
group |
protected List<LogPartition> |
logPartitions |
protected int |
size |
protected List<ChronicleLogTailer<M>> |
tailers |
Constructor and Description |
---|
ChronicleCompoundLogTailer(Collection<ChronicleLogTailer<M>> tailers,
String group) |
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.
|
protected LogRecord<M> |
read() |
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.
|
protected final List<ChronicleLogTailer<M extends Externalizable>> tailers
protected final int size
protected final List<LogPartition> logPartitions
protected boolean closed
protected long counter
public ChronicleCompoundLogTailer(Collection<ChronicleLogTailer<M>> tailers, String group)
public LogRecord<M> read(Duration timeout) throws InterruptedException
LogTailer
read
in interface LogTailer<M extends Externalizable>
InterruptedException
public LogOffset commit(LogPartition partition)
LogTailer
commit
in interface LogTailer<M extends Externalizable>
public void commit()
LogTailer
commit
in interface LogTailer<M extends Externalizable>
public void toEnd()
LogTailer
toEnd
in interface LogTailer<M extends Externalizable>
public void toStart()
LogTailer
toStart
in interface LogTailer<M extends Externalizable>
public void toLastCommitted()
LogTailer
toLastCommitted
in interface LogTailer<M extends Externalizable>
public Collection<LogPartition> assignments()
LogTailer
LogManager.subscribe(java.lang.String, java.util.Collection<java.lang.String>, org.nuxeo.lib.stream.log.RebalanceListener)
.assignments
in interface LogTailer<M extends Externalizable>
public String group()
LogTailer
group
in interface LogTailer<M extends Externalizable>
public boolean closed()
LogTailer
true
if the tailer has been closed.closed
in interface LogTailer<M extends Externalizable>
public void seek(LogOffset offset)
LogTailer
seek
in interface LogTailer<M extends Externalizable>
public void reset()
LogTailer
reset
in interface LogTailer<M extends Externalizable>
public void reset(LogPartition partition)
LogTailer
reset
in interface LogTailer<M extends Externalizable>
public void close()
close
in interface AutoCloseable
close
in interface LogTailer<M extends Externalizable>
Copyright © 2018 Nuxeo. All rights reserved.