public interface RollCycle
Modifier and Type | Method and Description |
---|---|
int |
current(net.openhft.chronicle.core.time.TimeProvider time,
long epoch) |
int |
defaultIndexCount() |
int |
defaultIndexSpacing()
Returns the space between excerpts that are explicitly indexed.
|
String |
format()
Returns the format that is to be applied when file names are calculated for a new roll cycle.
|
default int |
length()
Deprecated.
|
int |
lengthInMillis()
Returns the length in milliseconds (i.e.
|
long |
maxMessagesPerCycle() |
int |
toCycle(long index)
Returns the cycle for the given
index . |
long |
toIndex(int cycle,
long sequenceNumber)
Returns the index for the given
cycle and sequenceNumber . |
long |
toSequenceNumber(long index)
Returns the sequence number for the given
index . |
String format()
For example, the following formats can be returned:
int lengthInMillis()
For example, the following lengths can be returned:
@Deprecated default int length()
int defaultIndexCount()
int defaultIndexSpacing()
A higher number means higher sequential write performance but slower random access read. The sequential read performance is not affected by this property.
For example, the following default index spacing can be returned:
int current(net.openhft.chronicle.core.time.TimeProvider time, long epoch)
epoch
- and EPOCH offset, to all the user to define their own epochlong toIndex(int cycle, long sequenceNumber)
cycle
and sequenceNumber
.
An index is comprised of both a cycle and a sequence number but the way the index is composed of said properties may vary.
cycle
- to be composed into an indexsequenceNumber
- to be composed into an indexcycle
and sequenceNumber
long toSequenceNumber(long index)
index
.
An index is comprised of both a cycle and a sequence number but the way the index is composed of said properties may vary. This method
decomposes the provided index
and extracts the sequence number.
index
- to use when extracting the sequence numberindex
int toCycle(long index)
index
.
An index is comprised of both a cycle and a sequence number but the way the index is composed of said properties may vary. This method
decomposes the provided index
and extracts the cycle.
index
- to use when extracting the cycleindex
long maxMessagesPerCycle()
Copyright © 2020. All rights reserved.