Package me.ahoo.cosid
Interface IdGenerator
- All Superinterfaces:
Statistical
,StringIdGenerator
- All Known Subinterfaces:
CosIdGenerator
,IdGeneratorDecorator
,SegmentId
,SnowflakeFriendlyId
,SnowflakeId
- All Known Implementing Classes:
AbstractSnowflakeId
,AtomicLongGenerator
,ClockSyncCosIdGenerator
,ClockSyncSnowflakeId
,DefaultSegmentId
,DefaultSnowflakeFriendlyId
,LazyIdGenerator
,MillisecondSnowflakeId
,MockIdGenerator
,Radix36CosIdGenerator
,Radix62CosIdGenerator
,RadixCosIdGenerator
,SecondSnowflakeId
,SegmentChainId
,StringIdGeneratorDecorator
,StringSegmentId
,StringSnowflakeId
,UncertaintyIdGenerator
,UuidGenerator
Id Generator.
-
Method Summary
Modifier and TypeMethodDescriptionlong
generate()
Generate distributed ID.default String
Generate string type distributed ID.default IdConverter
ID converter, used to convertlong
type ID toString
.default IdGeneratorStat
stat()
-
Method Details
-
idConverter
ID converter, used to convertlong
type ID toString
.- Returns:
- ID converter
-
generate
long generate()Generate distributed ID.- Returns:
- generated distributed ID
-
generateAsString
Description copied from interface:StringIdGenerator
Generate string type distributed ID.- Specified by:
generateAsString
in interfaceStringIdGenerator
- Returns:
- string type distributed ID
-
stat
- Specified by:
stat
in interfaceStatistical
-