Package me.ahoo.cosid.segment
Interface IdSegmentDistributor
- All Superinterfaces:
Grouped
- All Known Subinterfaces:
GroupedIdSegmentDistributor
- All Known Implementing Classes:
DefaultGroupedIdSegmentDistributor
,DefaultGroupedIdSegmentDistributor.GroupedBinding
,IdSegmentDistributor.Atomic
,IdSegmentDistributor.Mock
,JdbcIdSegmentDistributor
,MongoIdSegmentDistributor
,ProxyIdSegmentDistributor
,SpringRedisIdSegmentDistributor
,ZookeeperIdSegmentDistributor
Id Segment Distributor.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
static class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
static final int
static final long
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
static void
ensureStep
(long step) getName()
default String
static String
getNamespacedName
(String namespace, String name) long
getStep()
default long
getStep
(int segments) default IdSegment
default IdSegment
nextIdSegment
(int segments, long ttl) default IdSegment
nextIdSegment
(long ttl) default IdSegmentChain
nextIdSegmentChain
(IdSegmentChain previousChain) default IdSegmentChain
nextIdSegmentChain
(IdSegmentChain previousChain, int segments, long ttl) default long
long
nextMaxId
(long step)
-
Field Details
-
DEFAULT_SEGMENTS
static final int DEFAULT_SEGMENTS- See Also:
-
DEFAULT_OFFSET
static final long DEFAULT_OFFSET- See Also:
-
DEFAULT_STEP
static final long DEFAULT_STEP- See Also:
-
-
Method Details
-
getNamespace
-
getName
-
getNamespacedName
-
getNamespacedName
-
getStep
long getStep() -
getStep
default long getStep(int segments) -
allowReset
default boolean allowReset() -
nextMaxId
long nextMaxId(long step) -
nextMaxId
default long nextMaxId() -
nextIdSegment
-
nextIdSegment
-
nextIdSegment
-
nextIdSegmentChain
-
nextIdSegmentChain
@Nonnull default IdSegmentChain nextIdSegmentChain(IdSegmentChain previousChain, int segments, long ttl) -
ensureStep
static void ensureStep(long step)
-