public class SingleChronicleQueueStore extends Object implements WireStore
| Constructor and Description |
|---|
SingleChronicleQueueStore(RollCycle rollCycle,
net.openhft.chronicle.wire.WireType wireType,
net.openhft.chronicle.bytes.MappedBytes mappedBytes,
long epoch,
int indexCount,
int indexSpacing,
StoreRecovery recovery,
int deltaCheckpointInterval,
int sourceId) |
| Modifier and Type | Method and Description |
|---|---|
net.openhft.chronicle.bytes.MappedBytes |
bytes() |
void |
close() |
int |
deltaCheckpointInterval() |
String |
dump() |
static String |
dump(String directoryFilePath) |
static void |
dumpStore(net.openhft.chronicle.wire.Wire wire) |
long |
epoch() |
File |
file() |
boolean |
indexable(long index) |
long |
lastAcknowledgedIndexReplicated()
when using replication to another host, this is the last index that has been confirmed to *
have been read by the remote host.
|
void |
lastAcknowledgedIndexReplicated(long newValue) |
long |
lastIndexReplicated()
when using replication to another host, this is the last index that has been sent to the remote host.
|
void |
lastIndexReplicated(long indexReplicated) |
long |
lastSequenceNumber(ExcerptContext ec) |
ScanResult |
linearScanTo(long index,
long knownIndex,
ExcerptContext ec,
long knownAddress) |
ScanResult |
moveToIndexForRead(ExcerptContext ec,
long index)
Moves the position to the index
|
long |
refCount() |
void |
release() |
void |
reserve() |
long |
sequenceForPosition(ExcerptContext ec,
long position,
boolean inclusive)
Reverse look up an index for a position.
|
void |
setPositionForSequenceNumber(ExcerptContext ec,
long sequenceNumber,
long position) |
int |
sourceId() |
String |
toString() |
long |
tryWriteHeader(net.openhft.chronicle.wire.Wire wire,
int safeLength) |
net.openhft.chronicle.wire.WireType |
wireType() |
void |
writeEOF(net.openhft.chronicle.wire.Wire wire,
long timeoutMS) |
long |
writeHeader(net.openhft.chronicle.wire.Wire wire,
int safeLength,
long timeoutMS) |
void |
writeMarshallable(net.openhft.chronicle.wire.WireOut wire) |
long |
writePosition() |
WireStore |
writePosition(long position) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic SingleChronicleQueueStore(@Nullable
RollCycle rollCycle,
@NotNull
net.openhft.chronicle.wire.WireType wireType,
@NotNull
net.openhft.chronicle.bytes.MappedBytes mappedBytes,
long epoch,
int indexCount,
int indexSpacing,
StoreRecovery recovery,
int deltaCheckpointInterval,
int sourceId)
rollCycle - the current rollCyclewireType - the wire type that is being usedmappedBytes - used to mapped the data store fileepoch - sets an epoch offset as the number of number of milliseconds
sinceindexCount - the number of entries in each index.indexSpacing - the spacing between indexed entries.recovery - deltaCheckpointInterval - public static void dumpStore(@NotNull
net.openhft.chronicle.wire.Wire wire)
@NotNull public net.openhft.chronicle.wire.WireType wireType()
wireType in interface CommonStore@Nullable public File file()
file in interface CommonStorepublic long lastAcknowledgedIndexReplicated()
lastAcknowledgedIndexReplicated in interface WireStorepublic void lastAcknowledgedIndexReplicated(long newValue)
lastAcknowledgedIndexReplicated in interface WireStorepublic long lastIndexReplicated()
lastIndexReplicated in interface WireStorepublic void lastIndexReplicated(long indexReplicated)
lastIndexReplicated in interface WireStoreindexReplicated - last index that has been sent to the remote host.@NotNull public String dump()
dump in interface CommonStorepublic long writePosition()
writePosition in interface WireStore@NotNull public WireStore writePosition(long position)
writePosition in interface WireStoreposition - the start of the last written excerpt to this cycle/storepublic long epoch()
@Nullable public ScanResult moveToIndexForRead(@NotNull ExcerptContext ec, long index)
moveToIndexForRead in interface WireStoreec - the data structure we are navigatingindex - the index we wish to move topublic void reserve()
throws IllegalStateException
reserve in interface net.openhft.chronicle.core.ReferenceCountedIllegalStateExceptionpublic void release()
throws IllegalStateException
release in interface net.openhft.chronicle.core.ReferenceCountedIllegalStateExceptionpublic long refCount()
refCount in interface net.openhft.chronicle.core.ReferenceCountedpublic void close()
close in interface Closeableclose in interface AutoCloseable@NotNull public net.openhft.chronicle.bytes.MappedBytes bytes()
bytes in interface CommonStorepublic long sequenceForPosition(@NotNull
ExcerptContext ec,
long position,
boolean inclusive)
throws net.openhft.chronicle.wire.UnrecoverableTimeoutException,
StreamCorruptedException
WireStoresequenceForPosition in interface WireStoreec - the wire of the bytes, to work withposition - of the start of the messagenet.openhft.chronicle.wire.UnrecoverableTimeoutExceptionStreamCorruptedExceptionpublic long lastSequenceNumber(@NotNull
ExcerptContext ec)
throws StreamCorruptedException
lastSequenceNumber in interface WireStoreStreamCorruptedExceptionpublic void writeMarshallable(@NotNull
net.openhft.chronicle.wire.WireOut wire)
writeMarshallable in interface net.openhft.chronicle.wire.WriteMarshallablepublic void setPositionForSequenceNumber(@NotNull
ExcerptContext ec,
long sequenceNumber,
long position)
throws net.openhft.chronicle.wire.UnrecoverableTimeoutException,
StreamCorruptedException
setPositionForSequenceNumber in interface WireStorenet.openhft.chronicle.wire.UnrecoverableTimeoutExceptionStreamCorruptedExceptionpublic ScanResult linearScanTo(long index, long knownIndex, ExcerptContext ec, long knownAddress)
linearScanTo in interface WireStorepublic long writeHeader(@NotNull
net.openhft.chronicle.wire.Wire wire,
int safeLength,
long timeoutMS)
throws EOFException,
net.openhft.chronicle.wire.UnrecoverableTimeoutException
writeHeader in interface CommonStoreEOFExceptionnet.openhft.chronicle.wire.UnrecoverableTimeoutExceptionpublic long tryWriteHeader(@NotNull
net.openhft.chronicle.wire.Wire wire,
int safeLength)
tryWriteHeader in interface CommonStorepublic void writeEOF(@NotNull
net.openhft.chronicle.wire.Wire wire,
long timeoutMS)
public int deltaCheckpointInterval()
deltaCheckpointInterval in interface WireStoreCopyright © 2018. All rights reserved.