Package me.ahoo.cosid
Interface IdGeneratorDecorator
- All Superinterfaces:
Decorator<IdGenerator>
,IdGenerator
,Statistical
,StringIdGenerator
- All Known Implementing Classes:
ClockSyncSnowflakeId
,DefaultSnowflakeFriendlyId
,LazyIdGenerator
,MockIdGenerator
,StringIdGeneratorDecorator
,StringSegmentId
,StringSnowflakeId
,UncertaintyIdGenerator
IdGenerator decorator.
-
Method Summary
Modifier and TypeMethodDescriptiondefault long
generate()
Generate distributed ID.Get decorator actual id generator.static <T extends IdGenerator>
TgetActual
(T idGenerator) default IdGeneratorStat
stat()
Methods inherited from interface me.ahoo.cosid.IdGenerator
generateAsString, idConverter
-
Method Details
-
getActual
Get decorator actual id generator.- Specified by:
getActual
in interfaceDecorator<IdGenerator>
- Returns:
- actual id generator
-
getActual
-
generate
default long generate()Description copied from interface:IdGenerator
Generate distributed ID.- Specified by:
generate
in interfaceIdGenerator
- Returns:
- generated distributed ID
-
stat
- Specified by:
stat
in interfaceIdGenerator
- Specified by:
stat
in interfaceStatistical
-