public enum RollCycles extends Enum<RollCycles> implements RollCycle
| Enum Constant and Description |
|---|
DAILY
Deprecated.
Use
LegacyRollCycles.DAILY instead |
FAST_DAILY
0xffffffff entries per day, indexing every 256th entry, leave as 4K and 256 for historical reasons.
|
FAST_HOURLY
0xffffffff entries per hour, indexing every 256th entry, leave as 4K and 256 for historical reasons.
|
FIVE_MINUTELY
0x40000000 entries per 5 minutes, indexing every 256th entry
|
FOUR_HOURLY
0xffffffff entries per four hours, indexing every 256th entry
|
HALF_HOURLY
0x40000000 entries per half hour, indexing every 256th entry
|
HOURLY
Deprecated.
Use
LegacyRollCycles.HOURLY instead |
HUGE_DAILY
Deprecated.
Use
LargeRollCycles.HUGE_DAILY instead |
HUGE_DAILY_XSPARSE
Deprecated.
Use
SparseRollCycles.HUGE_DAILY_XSPARSE instead |
LARGE_DAILY
Deprecated.
Use
LargeRollCycles.LARGE_DAILY instead |
LARGE_HOURLY
Deprecated.
Use
LargeRollCycles.LARGE_HOURLY instead |
LARGE_HOURLY_SPARSE
Deprecated.
Use
SparseRollCycles.LARGE_HOURLY_SPARSE instead |
LARGE_HOURLY_XSPARSE
Deprecated.
Use
SparseRollCycles.LARGE_HOURLY_XSPARSE instead |
MINUTELY
Deprecated.
Use
LegacyRollCycles.MINUTELY instead |
SIX_HOURLY
0xffffffff entries per six hours, indexing every 256th entry
|
SMALL_DAILY
Deprecated.
Use
SparseRollCycles.SMALL_DAILY instead |
TEN_MINUTELY
0x40000000 entries per 10 minutes, indexing every 256th entry
|
TEST_DAILY
Deprecated.
Use
TestRollCycles.TEST_DAILY instead |
TEST_HOURLY
Deprecated.
Use
TestRollCycles.TEST_HOURLY instead |
TEST_SECONDLY
Deprecated.
Use
TestRollCycles.TEST_SECONDLY instead |
TEST2_DAILY
Deprecated.
Use
TestRollCycles.TEST2_DAILY instead |
TEST4_DAILY
Deprecated.
Use
TestRollCycles.TEST4_DAILY instead |
TEST4_SECONDLY
Deprecated.
Use
TestRollCycles.TEST4_SECONDLY instead |
TEST8_DAILY
Deprecated.
Use
TestRollCycles.TEST8_DAILY instead |
TWENTY_MINUTELY
0x40000000 entries per 20 minutes, indexing every 256th entry
|
TWO_HOURLY
0xffffffff entries per 2 hours, indexing every 256th entry
|
XLARGE_DAILY
Deprecated.
Use
LargeRollCycles.XLARGE_DAILY instead |
| Modifier and Type | Field and Description |
|---|---|
static RollCycles |
DEFAULT |
MAX_INDEX_COUNT| Modifier and Type | Method and Description |
|---|---|
static Iterable<RollCycle> |
all() |
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 indexCount0,
int indexSpacing0)
Deprecated.
use
RollCycleArithmetic.maxMessagesPerCycle() instead |
int |
toCycle(long index)
Returns the cycle for the given
index. |
long |
toIndex(int cycle,
long sequenceNumber)
Returns the index for the provided
cycle and sequenceNumber. |
long |
toSequenceNumber(long index)
Returns the sequence number for the provided
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.
|
static RollCycle |
warnIfDeprecated(RollCycle rollCycle)
Check if the provided roll cycle is deprecated, log a warning if it is
|
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
@Deprecated public static final RollCycles MINUTELY
LegacyRollCycles.MINUTELY instead@Deprecated public static final RollCycles HOURLY
LegacyRollCycles.HOURLY instead@Deprecated public static final RollCycles DAILY
LegacyRollCycles.DAILY instead@Deprecated public static final RollCycles LARGE_HOURLY
LargeRollCycles.LARGE_HOURLY instead@Deprecated public static final RollCycles LARGE_DAILY
LargeRollCycles.LARGE_DAILY instead@Deprecated public static final RollCycles XLARGE_DAILY
LargeRollCycles.XLARGE_DAILY instead@Deprecated public static final RollCycles HUGE_DAILY
LargeRollCycles.HUGE_DAILY instead@Deprecated public static final RollCycles SMALL_DAILY
SparseRollCycles.SMALL_DAILY instead@Deprecated public static final RollCycles LARGE_HOURLY_SPARSE
SparseRollCycles.LARGE_HOURLY_SPARSE instead@Deprecated public static final RollCycles LARGE_HOURLY_XSPARSE
SparseRollCycles.LARGE_HOURLY_XSPARSE instead@Deprecated public static final RollCycles HUGE_DAILY_XSPARSE
SparseRollCycles.HUGE_DAILY_XSPARSE instead@Deprecated public static final RollCycles TEST_SECONDLY
TestRollCycles.TEST_SECONDLY instead@Deprecated public static final RollCycles TEST4_SECONDLY
TestRollCycles.TEST4_SECONDLY instead@Deprecated public static final RollCycles TEST_HOURLY
TestRollCycles.TEST_HOURLY instead@Deprecated public static final RollCycles TEST_DAILY
TestRollCycles.TEST_DAILY instead@Deprecated public static final RollCycles TEST2_DAILY
TestRollCycles.TEST2_DAILY instead@Deprecated public static final RollCycles TEST4_DAILY
TestRollCycles.TEST4_DAILY instead@Deprecated public static final RollCycles TEST8_DAILY
TestRollCycles.TEST8_DAILY insteadpublic 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 null@Deprecated public static long maxMessagesPerCycle(long indexCount0, int indexSpacing0)
RollCycleArithmetic.maxMessagesPerCycle() insteadpublic long maxMessagesPerCycle()
maxMessagesPerCycle in interface RollCyclepublic String format()
RollCycleFor example, the following formats can be returned:
cycle1 < cycle2,
the same relation must be kept for their string representations.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 long toIndex(int cycle,
long sequenceNumber)
RollCyclecycle and sequenceNumber.
An index is made up of cycle shifted left + sequenceNumber. sequenceNumber starts at 0 for each new cycle.
DAILY cycle has cycleShift=32 and sequenceMask=0xFFFFFFFF so the top 32 bits are for cycle and bottom
32 bits are for sequence. This means you can only store 2^32 entries per day.
HUGE_DAILY has shift=48 and mask=0xFFFFFFFFFFFF thus allowing 2^48 entries per day.
public long toSequenceNumber(long index)
RollCycleindex.
An index comprises 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 to extract the sequence numberindexpublic int toCycle(long index)
RollCycleindex.
An index comprises 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 RollCycle warnIfDeprecated(RollCycle rollCycle)
NOTE: This will be removed when the deprecated RollCycles are removed in x.26
rollCycle - The RollCycle to checkCopyright © 2023. All rights reserved.