public enum RollCycles extends Enum<RollCycles> implements RollCycle
| Enum Constant and Description |
|---|
DAILY
4 billion entries per day, indexing every 64th entry
|
HOURLY
256 million entries per hour, indexing every 16th entry
|
HUGE_DAILY
256 trillion entries per day with sparse indexing (every 1024th entry)
|
HUGE_DAILY_XSPARSE
256 trillion entries per day with super-sparse indexing (every (2^20)th entry)
|
LARGE_DAILY
128 billion entries per day, indexing every 128th entry
|
LARGE_HOURLY
2 billion entries per hour, indexing every 64th entry
|
LARGE_HOURLY_SPARSE
16 billion entries per hour with sparse indexing (every 1024th entry)
|
LARGE_HOURLY_XSPARSE
16 billion entries per hour with super-sparse indexing (every (2^20)th entry)
|
MINUTELY
64 million entries per minute
|
SMALL_DAILY
512 million entries per day
|
TEST_DAILY
Only good for testing - 63 entries per day
|
TEST_HOURLY
512 entries per hour
|
TEST_SECONDLY
Only good for testing
|
TEST2_DAILY
Only good for testing
|
TEST4_DAILY
Only good for testing
|
TEST4_SECONDLY
Only good for testing
|
TEST8_DAILY
Only good for testing
|
XLARGE_DAILY
4 trillion entries per day, indexing every 256th entry
|
| Modifier and Type | Method and Description |
|---|---|
static Iterable<RollCycles> |
all() |
int |
current(@NotNull 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.
|
int |
length()
Returns the length in milliseconds (i.e.
|
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. |
static RollCycles |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RollCycles[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RollCycles TEST_SECONDLY
public static final RollCycles TEST4_SECONDLY
public static final RollCycles MINUTELY
public static final RollCycles TEST_HOURLY
public static final RollCycles HOURLY
public static final RollCycles LARGE_HOURLY
public static final RollCycles LARGE_HOURLY_SPARSE
public static final RollCycles LARGE_HOURLY_XSPARSE
public static final RollCycles TEST_DAILY
public static final RollCycles TEST2_DAILY
public static final RollCycles TEST4_DAILY
public static final RollCycles TEST8_DAILY
public static final RollCycles SMALL_DAILY
public static final RollCycles DAILY
public static final RollCycles LARGE_DAILY
public static final RollCycles XLARGE_DAILY
public static final RollCycles HUGE_DAILY
public static final RollCycles HUGE_DAILY_XSPARSE
public static RollCycles[] values()
for (RollCycles c : RollCycles.values()) System.out.println(c);
public static RollCycles valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static Iterable<RollCycles> all()
public String format()
RollCycleFor example, the following formats can be returned:
public int length()
RollCycleFor example, the following lengths can be returned:
public int defaultIndexCount()
defaultIndexCount in interface RollCyclepublic int defaultIndexSpacing()
RollCycleA 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:
defaultIndexSpacing in interface RollCyclepublic int current(@NotNull
@NotNull net.openhft.chronicle.core.time.TimeProvider time,
long epoch)
public long toIndex(int cycle,
long sequenceNumber)
RollCyclecycle 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.
public long toSequenceNumber(long index)
RollCycleindex.
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.
toSequenceNumber in interface RollCycleindex - to use when extracting the sequence numberindexpublic int toCycle(long index)
RollCycleindex.
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.
Copyright © 2020. All rights reserved.