Package me.ahoo.cosid.jvm
Class AtomicLongGenerator
java.lang.Object
me.ahoo.cosid.jvm.AtomicLongGenerator
- All Implemented Interfaces:
IdGenerator
,Statistical
,StringIdGenerator
AtomicLong Generator.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
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, idConverter, stat
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
AtomicLongGenerator
public AtomicLongGenerator()
-
-
Method Details
-
generate
public long generate()Description copied from interface:IdGenerator
Generate distributed ID.- Specified by:
generate
in interfaceIdGenerator
- Returns:
- generated distributed ID
-