public enum RollCycles extends Enum<RollCycles> implements RollCycle
| Enum Constant and Description |
|---|
DAILY
4,294,967,295 entries per day, indexing every 64th entry, leave as 8K and 64 for historical reasons.
|
FAST_DAILY
4,294,967,295 entries per day, indexing every 256th entry, leave as 4K and 256 for historical reasons.
|
FAST_HOURLY
4,294,967,295 entries per hour, indexing every 256th entry, leave as 4K and 256 for historical reasons.
|
FIVE_MINUTELY
1,073,741,824 entries per 5 minutes, indexing every 256th entry
|
FOUR_HOURLY
4,294,967,295 entries per four hours, indexing every 256th entry
|
HALF_HOURLY
1,073,741,824 entries per half hour, indexing every 256th entry
|
HOURLY
268,435,456 entries per hour, indexing every 16th entry, leave as 4K and 16 for historical reasons.
|
HUGE_DAILY
281,474,976,710,655 entries per day with sparse indexing (every 1024th entry)
|
HUGE_DAILY_XSPARSE
281,474,976,710,655 entries per day with super-sparse indexing (every (2^20)th entry)
|
LARGE_DAILY
137,438,953,471 entries per day, indexing every 128th entry
|
LARGE_HOURLY
4,294,967,295 entries per hour, indexing every 64th entry
|
LARGE_HOURLY_SPARSE
17,179,869,183 entries per hour with sparse indexing (every 1024th entry)
|
LARGE_HOURLY_XSPARSE
4,398,046,511,103 entries per hour with super-sparse indexing (every (2^20)th entry)
|
MINUTELY
67,108,864 entries per minute, indexing every 16th entry
|
SIX_HOURLY
4,294,967,295 entries per six hours, indexing every 256th entry
|
SMALL_DAILY
536,870,912 entries per day, indexing every 8th entry
|
TEN_MINUTELY
1,073,741,824 entries per 10 minutes, indexing every 256th entry
|
TEST_DAILY
64 entries per day - Only good for testing
|
TEST_HOURLY
1,024 entries per hour - Only good for testing
|
TEST_SECONDLY
4,294,967,295 entries - Only good for testing
|
TEST2_DAILY
512 entries per day - Only good for testing
|
TEST4_DAILY
4,096 entries per day - Only good for testing
|
TEST4_SECONDLY
4,096 entries - Only good for testing
|
TEST8_DAILY
131,072 entries per day - Only good for testing
|
TWENTY_MINUTELY
1,073,741,824 entries per 20 minutes, indexing every 256th entry
|
TWO_HOURLY
4,294,967,295 entries per 2 hours, indexing every 256th entry
|
XLARGE_DAILY
4,398,046,511,103 entries per day, indexing every 256th entry
|
| Modifier and Type | Field and Description |
|---|---|
static RollCycles |
DEFAULT |
| 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 |
lengthInMillis()
Returns the length in milliseconds (i.e.
|
long |
maxMessagesPerCycle() |
static long |
maxMessagesPerCycle(long sequenceMask,
int indexCount,
int indexSpacing) |
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 FIVE_MINUTELY
public static final RollCycles TEN_MINUTELY
public static final RollCycles TWENTY_MINUTELY
public static final RollCycles HALF_HOURLY
public static final RollCycles FAST_HOURLY
public static final RollCycles TWO_HOURLY
public static final RollCycles FOUR_HOURLY
public static final RollCycles SIX_HOURLY
public static final RollCycles FAST_DAILY
public static final RollCycles MINUTELY
public static final RollCycles HOURLY
public static final RollCycles DAILY
public static final RollCycles LARGE_HOURLY
public static final RollCycles LARGE_DAILY
public static final RollCycles XLARGE_DAILY
public static final RollCycles HUGE_DAILY
public static final RollCycles SMALL_DAILY
public static final RollCycles LARGE_HOURLY_SPARSE
public static final RollCycles LARGE_HOURLY_XSPARSE
public static final RollCycles HUGE_DAILY_XSPARSE
public static final RollCycles TEST_SECONDLY
public static final RollCycles TEST4_SECONDLY
public static final RollCycles TEST_HOURLY
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 DEFAULT
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 long maxMessagesPerCycle()
maxMessagesPerCycle in interface RollCyclepublic static Iterable<RollCycles> all()
public String format()
RollCycleFor example, the following formats can be returned:
public int lengthInMillis()
RollCycleFor example, the following lengths can be returned:
lengthInMillis in interface RollCyclepublic 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.
public static long maxMessagesPerCycle(long sequenceMask,
int indexCount,
int indexSpacing)
Copyright © 2020. All rights reserved.