Class GroupedIdSegmentDistributorSpec
java.lang.Object
me.ahoo.cosid.test.segment.distributor.IdSegmentDistributorSpec
me.ahoo.cosid.test.segment.distributor.GroupedIdSegmentDistributorSpec
-
Field Summary
Fields inherited from class me.ahoo.cosid.test.segment.distributor.IdSegmentDistributorSpec
TEST_OFFSET, TEST_STEP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IdSegmentDistributorFactoryfactory()voidA string segment id with a grouped prefix takes the group from the segment the id came from.voidvoidvoidgetGroup()protected GroupBySuppliervoidvoidvoidvoidWith step 1 every id comes from its own call to the distributor: the id and its group must come from the same grouped counter even when the group rolls over in between, or "2026-1" could be issued twice.protected <T extends IdSegmentDistributor>
voidsetMaxIdBack(T distributor, long maxId) Methods inherited from class me.ahoo.cosid.test.segment.distributor.IdSegmentDistributorSpec
generateConcurrent, generateConcurrentOfChain, generateMultiInstanceConcurrent, getFactory, getName, getNamespace, getNamespacedName, getStep, getStepWithSegments, nextIdSegmentWithSegmentsAndTtl, nextIdSegmentWithTtl, nextMaxId, nextMaxIdConcurrent, nextMaxIdWithStep
-
Constructor Details
-
GroupedIdSegmentDistributorSpec
public GroupedIdSegmentDistributorSpec()
-
-
Method Details
-
groupedSupplier
-
nextMaxIdWhenBack
public void nextMaxIdWhenBack()- Overrides:
nextMaxIdWhenBackin classIdSegmentDistributorSpec
-
setMaxIdBack
- Specified by:
setMaxIdBackin classIdSegmentDistributorSpec
-
factory
- Overrides:
factoryin classIdSegmentDistributorSpec
-
getGroup
@Test public void getGroup()- Overrides:
getGroupin classIdSegmentDistributorSpec
-
nextIdSegment
@Test public void nextIdSegment()- Overrides:
nextIdSegmentin classIdSegmentDistributorSpec
-
nextIdSegmentChain
@Test public void nextIdSegmentChain()- Overrides:
nextIdSegmentChainin classIdSegmentDistributorSpec
-
generateGroupedCarriesTheGroup
@Test public void generateGroupedCarriesTheGroup() -
generateGroupedAsStringNeedsNoThreadLocalGroup
@Test public void generateGroupedAsStringNeedsNoThreadLocalGroup() -
generateAsStringUsesTheSegmentGroup
@Test public void generateAsStringUsesTheSegmentGroup()A string segment id with a grouped prefix takes the group from the segment the id came from. -
oneStepIdKeepsItsGroupAcrossRollover
@Test public void oneStepIdKeepsItsGroupAcrossRollover()With step 1 every id comes from its own call to the distributor: the id and its group must come from the same grouped counter even when the group rolls over in between, or "2026-1" could be issued twice.
-