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 rollEpoc,
int indexCount,
int indexSpacing) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
appendRollMeta(net.openhft.chronicle.wire.Wire wire,
long cycle,
long timeoutMS) |
String |
dump() |
static void |
dumpStore(net.openhft.chronicle.wire.Wire wire) |
long |
epoch() |
long |
indexForPosition(net.openhft.chronicle.wire.Wire wire,
long position,
long timeoutMS)
Reverse look up an index for a position.
|
long |
lastEntryIndexed(net.openhft.chronicle.wire.Wire wire,
long timeoutMS) |
net.openhft.chronicle.bytes.MappedBytes |
mappedBytes() |
ScanResult |
moveToIndex(net.openhft.chronicle.wire.Wire wire,
long index,
long timeoutMS)
Moves the position to the index
|
long |
refCount() |
void |
release() |
void |
reserve() |
String |
toString() |
void |
writeMarshallable(net.openhft.chronicle.wire.WireOut wire) |
long |
writePosition() |
WireStore |
writePosition(long position) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclose, release, releaseAll, tryReservepublic SingleChronicleQueueStore(@Nullable
RollCycle rollCycle,
@NotNull
net.openhft.chronicle.wire.WireType wireType,
@NotNull
net.openhft.chronicle.bytes.MappedBytes mappedBytes,
long rollEpoc,
int indexCount,
int indexSpacing)
rollCycle - the current rollCyclewireType - the wire type that is being usedmappedBytes - used to mapped the data store filerollEpoc - 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.public static void dumpStore(net.openhft.chronicle.wire.Wire wire)
public long writePosition()
writePosition in interface WireStorepublic WireStore writePosition(long position)
writePosition in interface WireStorepublic long epoch()
public long lastEntryIndexed(net.openhft.chronicle.wire.Wire wire,
long timeoutMS)
lastEntryIndexed in interface WireStorepublic boolean appendRollMeta(@NotNull
net.openhft.chronicle.wire.Wire wire,
long cycle,
long timeoutMS)
throws TimeoutException
appendRollMeta in interface WireStoreTimeoutExceptionpublic ScanResult moveToIndex(@NotNull net.openhft.chronicle.wire.Wire wire, long index, long timeoutMS) throws TimeoutException
moveToIndex in interface WireStorewire - the data structure we are navigatingindex - the index we wish to move totimeoutMS - TimeoutExceptionpublic 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.ReferenceCounted@NotNull public net.openhft.chronicle.bytes.MappedBytes mappedBytes()
mappedBytes in interface WireStorepublic long indexForPosition(net.openhft.chronicle.wire.Wire wire,
long position,
long timeoutMS)
throws EOFException,
TimeoutException
WireStoreindexForPosition in interface WireStoreposition - of the start of the messageEOFExceptionTimeoutExceptionpublic void writeMarshallable(@NotNull
net.openhft.chronicle.wire.WireOut wire)
writeMarshallable in interface net.openhft.chronicle.wire.WriteMarshallableCopyright © 2016. All rights reserved.