Package me.ahoo.cosid.provider
Class LazyIdGenerator
java.lang.Object
me.ahoo.cosid.provider.LazyIdGenerator
- All Implemented Interfaces:
Decorator<IdGenerator>
,IdGenerator
,IdGeneratorDecorator
,Statistical
,StringIdGenerator
Lazy loading IdGenerator.
-
Constructor Summary
ConstructorDescriptionLazyIdGenerator
(String generatorName) LazyIdGenerator
(String generatorName, IdGeneratorProvider idGeneratorProvider) -
Method Summary
Modifier and TypeMethodDescriptionasFriendlyId
(boolean required) asSegmentId
(boolean required) asSnowflakeId
(boolean required) Get decorator actual id generator.ID converter, used to convertlong
type ID toString
.tryGet
(boolean required) 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.IdGenerator
generateAsString
Methods inherited from interface me.ahoo.cosid.IdGeneratorDecorator
generate, stat
-
Constructor Details
-
LazyIdGenerator
-
LazyIdGenerator
-
-
Method Details
-
getGeneratorName
-
tryGet
-
asSnowflakeId
-
asFriendlyId
-
asSegmentId
-
getActual
Description copied from interface:IdGeneratorDecorator
Get decorator actual id generator.- Specified by:
getActual
in interfaceDecorator<IdGenerator>
- Specified by:
getActual
in interfaceIdGeneratorDecorator
- Returns:
- actual id generator
-
idConverter
Description copied from interface:IdGenerator
ID converter, used to convertlong
type ID toString
.- Specified by:
idConverter
in interfaceIdGenerator
- Returns:
- ID converter
-