public class SingleChronicleQueueStore extends net.openhft.chronicle.core.io.AbstractCloseable implements WireStore
| Constructor and Description |
|---|
SingleChronicleQueueStore(@NotNull RollCycle rollCycle,
@NotNull net.openhft.chronicle.wire.WireType wireType,
@NotNull net.openhft.chronicle.bytes.MappedBytes mappedBytes,
int indexCount,
int indexSpacing) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull net.openhft.chronicle.bytes.MappedBytes |
bytes() |
File |
currentFile() |
int |
cycle() |
SingleChronicleQueueStore |
cycle(int cycle) |
int |
dataVersion() |
@NotNull String |
dump() |
static @NotNull String |
dump(@NotNull String directoryFilePath) |
String |
dumpHeader() |
@NotNull File |
file() |
boolean |
indexable(long index) |
void |
initIndex(@NotNull net.openhft.chronicle.wire.Wire wire) |
long |
lastSequenceNumber(@NotNull ExcerptContext ec) |
ScanResult |
linearScanTo(long index,
long knownIndex,
ExcerptContext ec,
long knownAddress) |
long |
moveToEndForRead(@NotNull net.openhft.chronicle.wire.Wire w) |
@Nullable ScanResult |
moveToIndexForRead(@NotNull ExcerptContext ec,
long index)
Moves the position to the index
|
@Nullable ScanResult |
moveToStartForRead(@NotNull ExcerptContext ec)
Moves the position to the start
|
protected void |
performClose() |
long |
sequenceForPosition(@NotNull ExcerptContext ec,
long position,
boolean inclusive)
Reverse look up an index for a position.
|
void |
setPositionForSequenceNumber(@NotNull ExcerptContext ec,
long sequenceNumber,
long position)
Sets the position using the provided parameters.
|
@NotNull String |
shortDump() |
protected boolean |
threadSafetyCheck(boolean isUsed) |
@NotNull String |
toString() |
boolean |
writeEOF(@NotNull net.openhft.chronicle.wire.Wire wire,
long timeoutMS) |
void |
writeMarshallable(@NotNull net.openhft.chronicle.wire.WireOut wire) |
long |
writePosition() |
@NotNull WireStore |
writePosition(long position) |
assertCloseablesClosed, clearUsedByThread, close, createdHere, disableCloseableTracing, enableCloseableTracing, isClosed, isClosing, isInUserThread, performCloseInBackground, referenceId, resetUsedByThread, shouldPerformCloseInBackground, shouldWaitForClosed, throwExceptionIfClosed, throwExceptionIfClosedInSetter, unmonitor, waitForCloseablesToClose, waitForClosed, warnAndCloseIfNotClosedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitusesSelfDescribingMessagepublic SingleChronicleQueueStore(@NotNull
@NotNull RollCycle rollCycle,
@NotNull
@NotNull net.openhft.chronicle.wire.WireType wireType,
@NotNull
@NotNull net.openhft.chronicle.bytes.MappedBytes mappedBytes,
int indexCount,
int indexSpacing)
rollCycle - the current rollCyclewireType - the wire type that is being usedmappedBytes - used to mapped the data store fileindexCount - the number of entries in each index.indexSpacing - the spacing between indexed entries.@NotNull public @NotNull File file()
file in interface CommonStore@NotNull public @NotNull String dump()
dump in interface CommonStore@NotNull public @NotNull String shortDump()
shortDump in interface CommonStorepublic String dumpHeader()
dumpHeader in interface WireStorepublic long writePosition()
writePosition in interface WireStore@NotNull public @NotNull WireStore writePosition(long position)
writePosition in interface WireStoreposition - the start of the last written excerpt to this cycle/store@Nullable public @Nullable ScanResult moveToIndexForRead(@NotNull @NotNull ExcerptContext ec, long index)
moveToIndexForRead in interface WireStoreec - the data structure we are navigatingindex - the index we wish to move to@Nullable public @Nullable ScanResult moveToStartForRead(@NotNull @NotNull ExcerptContext ec)
moveToStartForRead in interface WireStoreec - the data structure we are navigatingprotected boolean threadSafetyCheck(boolean isUsed)
threadSafetyCheck in class net.openhft.chronicle.core.io.AbstractCloseablepublic long moveToEndForRead(@NotNull
@NotNull net.openhft.chronicle.wire.Wire w)
moveToEndForRead in interface WireStoreprotected void performClose()
performClose in class net.openhft.chronicle.core.io.AbstractCloseable@NotNull public @NotNull net.openhft.chronicle.bytes.MappedBytes bytes()
bytes in interface CommonStorepublic long sequenceForPosition(@NotNull
@NotNull ExcerptContext ec,
long position,
boolean inclusive)
throws StreamCorruptedException
WireStoresequenceForPosition in interface WireStoreec - the wire of the bytes, to work withposition - of the start of the messageStreamCorruptedExceptionpublic long lastSequenceNumber(@NotNull
@NotNull ExcerptContext ec)
throws StreamCorruptedException
lastSequenceNumber in interface WireStoreStreamCorruptedException@NotNull public @NotNull String toString()
toString in class net.openhft.chronicle.core.io.AbstractCloseablepublic void writeMarshallable(@NotNull
@NotNull net.openhft.chronicle.wire.WireOut wire)
writeMarshallable in interface net.openhft.chronicle.wire.WriteMarshallablepublic void initIndex(@NotNull
@NotNull net.openhft.chronicle.wire.Wire wire)
public void setPositionForSequenceNumber(@NotNull
@NotNull ExcerptContext ec,
long sequenceNumber,
long position)
throws StreamCorruptedException
WireStoresetPositionForSequenceNumber in interface WireStoreec - the wire of the bytes, to work withsequenceNumber - to use when setting positionposition - of the start of the messageStreamCorruptedException - if the stream is corruptedpublic ScanResult linearScanTo(long index, long knownIndex, ExcerptContext ec, long knownAddress)
linearScanTo in interface WireStorepublic boolean writeEOF(@NotNull
@NotNull net.openhft.chronicle.wire.Wire wire,
long timeoutMS)
public int dataVersion()
dataVersion in interface WireStorepublic SingleChronicleQueueStore cycle(int cycle)
public int cycle()
public File currentFile()
Copyright © 2021. All rights reserved.