public class IndexedSingleChronicleQueue extends AbstractChronicle
Created by peter.lawrey on 30/01/15.
| Constructor and Description |
|---|
IndexedSingleChronicleQueue(String filename,
long blockSize,
net.openhft.chronicle.wire.WireType wireType) |
| Modifier and Type | Method and Description |
|---|---|
long |
appendDocument(net.openhft.chronicle.bytes.Bytes buffer) |
net.openhft.chronicle.bytes.Bytes |
bytes() |
void |
clear()
Remove all the entries in the queue.
|
void |
close() |
ExcerptAppender |
createAppender()
An Appender can be used to write new excerpts sequentially to the upper.
|
Excerpt |
createExcerpt()
An Excerpt can be used access entries randomly and optionally change them.
|
ExcerptTailer |
createTailer()
A Tailer can be used to read sequentially from the lower of a given position.
|
long |
firstAvailableIndex() |
long |
firstBytes() |
boolean |
index(long index,
net.openhft.chronicle.bytes.VanillaBytes bytes) |
long |
indexToIndex() |
long |
lastIndex() |
long |
lastWrittenIndex() |
String |
name() |
long |
newIndex()
Creates a new Excerpt containing and index which will be 1L << 17L bytes long, This method is used for creating
both the primary and secondary indexes.
|
boolean |
readDocument(AtomicLong offset,
net.openhft.chronicle.bytes.Bytes buffer) |
boolean |
readDocument(long offset,
net.openhft.chronicle.wire.ReadMarshallable buffer) |
long |
size() |
protected net.openhft.chronicle.wire.Wire |
wire() |
Class<? extends net.openhft.chronicle.wire.Wire> |
wireType() |
public IndexedSingleChronicleQueue(@NotNull
String filename,
long blockSize,
@NotNull
net.openhft.chronicle.wire.WireType wireType)
throws IOException
IOExceptionpublic String name()
@NotNull public Excerpt createExcerpt() throws IOException
ChronicleQueueIOException - if an IO problem occurs@NotNull public ExcerptTailer createTailer() throws IOException
ChronicleQueueIOException - if an IO problem occurs@NotNull public ExcerptAppender createAppender() throws IOException
ChronicleQueueIOException - if an IO problem occurspublic long size()
public void clear()
ChronicleQueuepublic long firstAvailableIndex()
public long lastWrittenIndex()
protected net.openhft.chronicle.wire.Wire wire()
wire in class AbstractChroniclepublic Class<? extends net.openhft.chronicle.wire.Wire> wireType()
wireType in class AbstractChroniclepublic long indexToIndex()
indexToIndex in class AbstractChroniclepublic long newIndex()
newIndex in class AbstractChroniclepublic void close()
public long appendDocument(@NotNull
net.openhft.chronicle.bytes.Bytes buffer)
public boolean readDocument(long offset,
net.openhft.chronicle.wire.ReadMarshallable buffer)
public boolean readDocument(@NotNull
AtomicLong offset,
@NotNull
net.openhft.chronicle.bytes.Bytes buffer)
@NotNull public net.openhft.chronicle.bytes.Bytes bytes()
public long lastIndex()
public boolean index(long index,
@NotNull
net.openhft.chronicle.bytes.VanillaBytes bytes)
public long firstBytes()
Copyright © 2015. All rights reserved.