public class CQTailer<M extends Message> extends Object implements MQueues.Tailer<M>
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_OFFSET_NAMESPACE |
Constructor and Description |
---|
CQTailer(String basePath,
net.openhft.chronicle.queue.ExcerptTailer tailer,
int queue) |
CQTailer(String basePath,
net.openhft.chronicle.queue.ExcerptTailer tailer,
int queue,
String nameSpace) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Offset |
commit()
Commit the offset of the last message returned by read.
|
int |
getQueue()
Returns the associated queue index.
|
M |
read(Duration timeout)
Read a message from the queue within the timeout.
|
void |
toEnd()
Go to the end of the queue.
|
void |
toLastCommitted()
Go just after the last committed message.
|
void |
toStart()
Go to the beginning of the queue.
|
public static final String DEFAULT_OFFSET_NAMESPACE
public CQTailer(String basePath, net.openhft.chronicle.queue.ExcerptTailer tailer, int queue)
public M read(Duration timeout) throws InterruptedException
MQueues.Tailer
read
in interface MQueues.Tailer<M extends Message>
InterruptedException
public Offset commit()
MQueues.Tailer
commit
in interface MQueues.Tailer<M extends Message>
public void toEnd()
MQueues.Tailer
toEnd
in interface MQueues.Tailer<M extends Message>
public void toStart()
MQueues.Tailer
toStart
in interface MQueues.Tailer<M extends Message>
public void toLastCommitted()
MQueues.Tailer
toLastCommitted
in interface MQueues.Tailer<M extends Message>
public int getQueue()
MQueues.Tailer
getQueue
in interface MQueues.Tailer<M extends Message>
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2017 Nuxeo. All rights reserved.