Package me.ahoo.cosid.sharding
Class IntervalTimeline
java.lang.Object
me.ahoo.cosid.sharding.IntervalTimeline
- All Implemented Interfaces:
PreciseSharding<LocalDateTime>
,RangeSharding<LocalDateTime>
,Sharding<LocalDateTime>
Interval Timeline.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionIntervalTimeline
(String logicNamePrefix, com.google.common.collect.Range<LocalDateTime> effectiveInterval, IntervalStep step, DateTimeFormatter suffixFormatter) -
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(LocalDateTime time) sharding
(com.google.common.collect.Range<LocalDateTime> shardingValue) sharding
(LocalDateTime shardingValue) int
size()
-
Constructor Details
-
IntervalTimeline
public IntervalTimeline(String logicNamePrefix, com.google.common.collect.Range<LocalDateTime> effectiveInterval, IntervalStep step, DateTimeFormatter suffixFormatter)
-
-
Method Details
-
size
public int size() -
contains
-
getStartInterval
-
getEffectiveNodes
- Specified by:
getEffectiveNodes
in interfaceSharding<LocalDateTime>
-
sharding
- Specified by:
sharding
in interfacePreciseSharding<LocalDateTime>
-
sharding
@Nonnull public Collection<String> sharding(com.google.common.collect.Range<LocalDateTime> shardingValue) - Specified by:
sharding
in interfaceRangeSharding<LocalDateTime>
-