public interface LogAppender<M extends Externalizable>
Modifier and Type | Method and Description |
---|---|
LogOffset |
append(int partition,
M message)
Append a message into a partition, returns
LogOffset position of the message. |
default LogOffset |
append(String key,
M message)
Same as
append(int, Externalizable) , the queue is chosen using a hash of . |
boolean |
closed()
Returns
true if the appender has been closed by the manager. |
String |
name()
Returns the Log's name.
|
int |
size()
Returns the number of partitions in the Log.
|
boolean |
waitFor(LogOffset offset,
String group,
Duration timeout)
Wait for consumer to process a message up to the offset.
|
int size()
LogOffset append(int partition, M message)
LogOffset
position of the message. This method is thread safe,
a queue can be shared by multiple producers.partition
- index lower than size()
default LogOffset append(String key, M message)
append(int, Externalizable)
, the queue is chosen using a hash of .boolean waitFor(LogOffset offset, String group, Duration timeout) throws InterruptedException
true
if the message has been consumed, false
in case
of timeout.InterruptedException
boolean closed()
true
if the appender has been closed by the manager.Copyright © 2018 Nuxeo. All rights reserved.