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() |
void |
writeMarshallable(net.openhft.chronicle.wire.WireOut wire) |
long |
writePosition() |
WireStore |
writePosition(long position) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, release, releaseAll, tryReserve
public 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 WireStore
public WireStore writePosition(long position)
writePosition
in interface WireStore
public long epoch()
public long lastEntryIndexed(net.openhft.chronicle.wire.Wire wire, long timeoutMS)
lastEntryIndexed
in interface WireStore
public boolean appendRollMeta(@NotNull net.openhft.chronicle.wire.Wire wire, long cycle, long timeoutMS) throws TimeoutException
appendRollMeta
in interface WireStore
TimeoutException
public ScanResult moveToIndex(@NotNull net.openhft.chronicle.wire.Wire wire, long index, long timeoutMS) throws TimeoutException
moveToIndex
in interface WireStore
wire
- the data structure we are navigatingindex
- the index we wish to move totimeoutMS
- TimeoutException
public void reserve() throws IllegalStateException
reserve
in interface net.openhft.chronicle.core.ReferenceCounted
IllegalStateException
public void release() throws IllegalStateException
release
in interface net.openhft.chronicle.core.ReferenceCounted
IllegalStateException
public long refCount()
refCount
in interface net.openhft.chronicle.core.ReferenceCounted
@NotNull public net.openhft.chronicle.bytes.MappedBytes mappedBytes()
mappedBytes
in interface WireStore
public long indexForPosition(net.openhft.chronicle.wire.Wire wire, long position, long timeoutMS) throws EOFException, TimeoutException
WireStore
indexForPosition
in interface WireStore
position
- of the start of the messageEOFException
TimeoutException
public void writeMarshallable(@NotNull net.openhft.chronicle.wire.WireOut wire)
writeMarshallable
in interface net.openhft.chronicle.wire.WriteMarshallable
Copyright © 2016. All rights reserved.