public class FlakeIdGeneratorConfigReadOnly extends FlakeIdGeneratorConfig
DEFAULT_PREFETCH_COUNT, DEFAULT_PREFETCH_VALIDITY_MILLIS| Modifier and Type | Method and Description |
|---|---|
void |
setName(String name)
Deprecated.
Sets the name or name pattern for this config.
|
FlakeIdGeneratorConfig |
setPrefetchCount(int prefetchCount)
Deprecated.
How many IDs are pre-fetched on the background when one call to
FlakeIdGenerator.newId() is made. |
FlakeIdGeneratorConfig |
setPrefetchValidityMillis(long prefetchValidityMs)
Deprecated.
For how long the pre-fetched IDs can be used.
|
equals, getAsReadOnly, getFactoryId, getId, getName, getPrefetchCount, getPrefetchValidityMillis, hashCode, readData, toString, writeDatapublic void setName(String name)
FlakeIdGeneratorConfigConfig.setName in class FlakeIdGeneratorConfigpublic FlakeIdGeneratorConfig setPrefetchCount(int prefetchCount)
FlakeIdGeneratorConfigFlakeIdGenerator.newId() is made.
Value must be >= 1, default is 100.
setPrefetchCount in class FlakeIdGeneratorConfigpublic FlakeIdGeneratorConfig setPrefetchValidityMillis(long prefetchValidityMs)
FlakeIdGeneratorConfigTime unit is milliseconds.
If value is <= 0, validity is unlimited. Default value is 600,000 (10 minutes).
The IDs contain timestamp component, which ensures rough global ordering of IDs. If an ID is assigned to an event that occurred much later, it will be much out of order. If you don't need ordering, set this value to 0.
setPrefetchValidityMillis in class FlakeIdGeneratorConfigCopyright © 2018. All Rights Reserved.