java.lang.Object
me.ahoo.cosid.segment.PeriodicPolicy
How a
PeriodicSegmentGenerator moves between periods (04-segment.md §3). Immutable; built with
builder(), the only way to create one, so fields can be added with a default (api-freeze.md §4).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds aPeriodicPolicy;PeriodicPolicy.Builder.build()checks the fields. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PeriodicPolicyEvery default: prewarm 1min, never sealed. -
Method Summary
Modifier and TypeMethodDescriptionstatic PeriodicPolicy.Builderbuilder()A builder starting from the defaults (DEFAULT).booleaninthashCode()prewarm()The next period is created and warmed up this long before the current one ends.The key of a period is sealed this long after the period ends (at least a day is advised).toString()
-
Field Details
-
DEFAULT
Every default: prewarm 1min, never sealed.
-
-
Method Details
-
builder
A builder starting from the defaults (DEFAULT).- Returns:
- the builder
-
prewarm
The next period is created and warmed up this long before the current one ends.- Returns:
- the prewarm; default 1min
-
sealAfter
The key of a period is sealed this long after the period ends (at least a day is advised).- Returns:
- the delay; default none, never sealed
-
equals
-
hashCode
public int hashCode() -
toString
-