Package me.ahoo.cosid.segment.grouped
Class DefaultGroupedIdSegmentDistributor.GroupedBinding
java.lang.Object
me.ahoo.cosid.segment.grouped.DefaultGroupedIdSegmentDistributor.GroupedBinding
- All Implemented Interfaces:
Grouped
,GroupedIdSegmentDistributor
,IdSegmentDistributor
- Enclosing class:
- DefaultGroupedIdSegmentDistributor
public static class DefaultGroupedIdSegmentDistributor.GroupedBinding
extends Object
implements GroupedIdSegmentDistributor
-
Nested Class Summary
Nested classes/interfaces inherited from interface me.ahoo.cosid.segment.IdSegmentDistributor
IdSegmentDistributor.Atomic, IdSegmentDistributor.Mock
-
Field Summary
Fields inherited from interface me.ahoo.cosid.segment.IdSegmentDistributor
DEFAULT_OFFSET, DEFAULT_SEGMENTS, DEFAULT_STEP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
long
getStep()
group()
nextIdSegment
(int segments, long ttl) nextIdSegment
(long ttl) nextIdSegmentChain
(IdSegmentChain previousChain, int segments, long ttl) long
nextMaxId
(long step) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface me.ahoo.cosid.segment.grouped.GroupedIdSegmentDistributor
allowReset
Methods inherited from interface me.ahoo.cosid.segment.IdSegmentDistributor
getNamespacedName, getStep, nextIdSegment, nextIdSegmentChain, nextMaxId
-
Constructor Details
-
GroupedBinding
-
-
Method Details
-
group
-
getNamespace
- Specified by:
getNamespace
in interfaceIdSegmentDistributor
-
getName
- Specified by:
getName
in interfaceIdSegmentDistributor
-
getStep
public long getStep()- Specified by:
getStep
in interfaceIdSegmentDistributor
-
nextMaxId
public long nextMaxId(long step) - Specified by:
nextMaxId
in interfaceIdSegmentDistributor
-
nextIdSegment
- Specified by:
nextIdSegment
in interfaceIdSegmentDistributor
-
nextIdSegment
- Specified by:
nextIdSegment
in interfaceIdSegmentDistributor
-
nextIdSegmentChain
@Nonnull public IdSegmentChain nextIdSegmentChain(IdSegmentChain previousChain, int segments, long ttl) - Specified by:
nextIdSegmentChain
in interfaceIdSegmentDistributor
-