java.lang.Object
me.ahoo.cosid.segment.PeriodicPolicy.Builder
- Enclosing class:
PeriodicPolicy
Builds a
PeriodicPolicy; build() checks the fields.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the policy.Sets how long before the current period ends the next one is created and warmed up.Sets how long after a period ends its key is sealed (at least a day is advised).
-
Method Details
-
prewarm
Sets how long before the current period ends the next one is created and warmed up.- Parameters:
prewarm- the prewarm, not negative; default 1min- Returns:
- this builder
-
sealAfter
Sets how long after a period ends its key is sealed (at least a day is advised).- Parameters:
sealAfter- the delay, not negative; default none, never sealed- Returns:
- this builder
-
build
Builds the policy.- Returns:
- the policy
- Throws:
IllegalArgumentException- if a field is negative
-