public static class SingleChronicleQueueExcerpts.StoreTailer extends Object implements ExcerptTailer, net.openhft.chronicle.wire.SourceContext, ExcerptContext
Constructor and Description |
---|
StoreTailer(SingleChronicleQueue queue) |
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.
|
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
|
long |
lastAcknowledgedIndexReplicated() |
void |
lastAcknowledgedIndexReplicated(long acknowledgeIndex) |
long |
lastIndexReplicated() |
void |
lastIndexReplicated(long lastIndexReplicated) |
boolean |
moveToIndex(long index)
Randomly select an Excerpt.
|
RollingChronicleQueue |
queue() |
boolean |
readAfterReplicaAcknowledged() |
void |
readAfterReplicaAcknowledged(boolean readAfterReplicaAcknowledged) |
boolean |
readDocument(net.openhft.chronicle.wire.ReadMarshallable reader) |
static net.openhft.chronicle.wire.MessageHistory |
readHistory(net.openhft.chronicle.wire.DocumentContext dc,
net.openhft.chronicle.wire.MessageHistory history) |
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) |
void |
releaseResources()
Can be used to manually release resources when this
StoreTailer is no longer used.
|
void |
setCycle(int cycle) |
int |
sourceId() |
TailerState |
state() |
WireStore |
store() |
long |
timeoutMS() |
ExcerptTailer |
toEnd()
Wind to the last entry in the last cycle
|
ExcerptTailer |
toStart()
Replay from the first entry in the first cycle.
|
String |
toString() |
net.openhft.chronicle.wire.Wire |
wire() |
net.openhft.chronicle.wire.Wire |
wireForIndex() |
public StoreTailer(@NotNull SingleChronicleQueue queue)
public boolean readDocument(@NotNull net.openhft.chronicle.wire.ReadMarshallable reader)
readDocument
in interface net.openhft.chronicle.wire.MarshallableIn
@NotNull public net.openhft.chronicle.wire.DocumentContext readingDocument()
ExcerptTailer
MarshallableIn.readDocument(ReadMarshallable)
but with out the use of a
lambda expression.
This method is the ExcerptTailer equivalent of WireIn.readingDocument()
readingDocument
in interface ExcerptTailer
readingDocument
in interface net.openhft.chronicle.wire.MarshallableIn
public net.openhft.chronicle.wire.Wire wire()
wire
in interface ExcerptContext
public net.openhft.chronicle.wire.Wire wireForIndex()
wireForIndex
in interface ExcerptContext
public long timeoutMS()
timeoutMS
in interface ExcerptContext
public int sourceId()
sourceId
in interface ExcerptCommon<ExcerptTailer>
sourceId
in interface net.openhft.chronicle.wire.SourceContext
@NotNull public net.openhft.chronicle.wire.DocumentContext readingDocument(boolean includeMetaData)
readingDocument
in interface ExcerptTailer
public long index()
index
in interface ExcerptTailer
index
in interface net.openhft.chronicle.wire.SourceContext
public int cycle()
cycle
in interface ExcerptTailer
public boolean moveToIndex(long index)
ExcerptTailer
moveToIndex
in interface ExcerptTailer
index
- index to look up, the index includes the cycle number and a sequence number from with this cycle@NotNull public final ExcerptTailer toStart()
ExcerptTailer
toStart
in interface ExcerptTailer
@NotNull public ExcerptTailer toEnd()
ExcerptTailer
If the direction() == FORWARD, this will be 1 more than the last entry.
Otherwise the index will be the last entry.
toEnd
in interface ExcerptTailer
public TailerDirection direction()
direction
in interface ExcerptTailer
@NotNull public ExcerptTailer direction(TailerDirection direction)
ExcerptTailer
direction
in interface ExcerptTailer
direction
- NONE, FORWARD, BACKWARD@NotNull public RollingChronicleQueue queue()
queue
in interface ExcerptCommon<ExcerptTailer>
public Runnable getCloserJob()
ExcerptTailer
getCloserJob
in interface ExcerptTailer
public void releaseResources()
public void readAfterReplicaAcknowledged(boolean readAfterReplicaAcknowledged)
readAfterReplicaAcknowledged
in interface ExcerptTailer
public boolean readAfterReplicaAcknowledged()
readAfterReplicaAcknowledged
in interface ExcerptTailer
@NotNull public TailerState state()
state
in interface ExcerptTailer
@Nullable public static net.openhft.chronicle.wire.MessageHistory readHistory(net.openhft.chronicle.wire.DocumentContext dc, net.openhft.chronicle.wire.MessageHistory history)
@NotNull public ExcerptTailer afterLastWritten(@NotNull ChronicleQueue queue)
ExcerptTailer
afterLastWritten
in interface ExcerptTailer
queue
- which was written to.@NotNull public ExcerptTailer indexing(boolean indexing)
ExcerptTailer
indexing
in interface ExcerptTailer
indexing
- should this ExcerptTailer perform indexingpublic void lastAcknowledgedIndexReplicated(long acknowledgeIndex)
public void lastIndexReplicated(long lastIndexReplicated)
public long lastAcknowledgedIndexReplicated()
public long lastIndexReplicated()
public void setCycle(int cycle)
@NotNull public WireStore store()
Copyright © 2018. All rights reserved.