public interface ExcerptTailer extends ExcerptCommon<ExcerptTailer>, net.openhft.chronicle.wire.MarshallableIn, net.openhft.chronicle.wire.SourceContext
ChronicleQueue
.Modifier and Type | Method and Description |
---|---|
ExcerptTailer |
afterLastWritten(ChronicleQueue queue)
Wind this tailer to after the last entry which wrote an entry to the queue
|
int |
cycle() |
TailerDirection |
direction() |
ExcerptTailer |
direction(TailerDirection direction)
Set the direction of movement.
|
default Runnable |
getCloserJob()
A task that will be run if a WeakReference referring this appender is registered with a clean-up task.
|
long |
index() |
ExcerptTailer |
indexing(boolean indexing)
Causes this tailer to update the index as queue excerpts are read
|
boolean |
moveToIndex(long index)
Randomly select an Excerpt.
|
default boolean |
readAfterReplicaAcknowledged() |
default void |
readAfterReplicaAcknowledged(boolean readAfterReplicaAcknowledged) |
default net.openhft.chronicle.wire.DocumentContext |
readingDocument()
equivalent to
MarshallableIn.readDocument(ReadMarshallable) but with out the use of a
lambda expression. |
net.openhft.chronicle.wire.DocumentContext |
readingDocument(boolean includeMetaData) |
TailerState |
state() |
ExcerptTailer |
toEnd()
Wind to the last entry in the last cycle
|
ExcerptTailer |
toStart()
Replay from the first entry in the first cycle.
|
queue, sourceId
@NotNull default net.openhft.chronicle.wire.DocumentContext readingDocument()
MarshallableIn.readDocument(ReadMarshallable)
but with out the use of a
lambda expression.
This method is the ExcerptTailer equivalent of WireIn.readingDocument()
readingDocument
in interface net.openhft.chronicle.wire.MarshallableIn
@NotNull net.openhft.chronicle.wire.DocumentContext readingDocument(boolean includeMetaData)
long index()
index
in interface net.openhft.chronicle.wire.SourceContext
try (tailer.readingDocument){ }
block, returns index of current reading document.
Otherwise, the next index to read.
Index includes the cycle and the sequence number in that cycleint cycle()
boolean moveToIndex(long index)
index
- index to look up, the index includes the cycle number and a sequence number from with this cycle@NotNull ExcerptTailer toStart()
@NotNull ExcerptTailer toEnd()
If the direction() == FORWARD, this will be 1 more than the last entry.
Otherwise the index will be the last entry.
TailerDirection direction()
@NotNull ExcerptTailer direction(TailerDirection direction)
direction
- NONE, FORWARD, BACKWARD@NotNull ExcerptTailer afterLastWritten(ChronicleQueue queue) throws net.openhft.chronicle.core.io.IORuntimeException
queue
- which was written to.net.openhft.chronicle.core.io.IORuntimeException
- if the queue couldn't be wound to the last index.@NotNull ExcerptTailer indexing(boolean indexing)
indexing
- should this ExcerptTailer perform indexingdefault void readAfterReplicaAcknowledged(boolean readAfterReplicaAcknowledged)
default boolean readAfterReplicaAcknowledged()
@NotNull TailerState state()
default Runnable getCloserJob()
Copyright © 2018. All rights reserved.