Package me.ahoo.cosid.snowflake
Class StringSnowflakeId
java.lang.Object
me.ahoo.cosid.StringIdGeneratorDecorator
me.ahoo.cosid.snowflake.StringSnowflakeId
- All Implemented Interfaces:
Decorator<IdGenerator>
,IdGenerator
,IdGeneratorDecorator
,SnowflakeId
,Statistical
,StringIdGenerator
- Direct Known Subclasses:
DefaultSnowflakeFriendlyId
String SnowflakeId.
-
Field Summary
Fields inherited from class me.ahoo.cosid.StringIdGeneratorDecorator
actual, idConverter
Fields inherited from interface me.ahoo.cosid.snowflake.SnowflakeId
TOTAL_BIT
-
Constructor Summary
-
Method Summary
Methods inherited from class me.ahoo.cosid.StringIdGeneratorDecorator
getActual, idConverter
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
Methods inherited from interface me.ahoo.cosid.IdGeneratorDecorator
generate
Methods inherited from interface me.ahoo.cosid.snowflake.SnowflakeId
isSafeJavascript
-
Constructor Details
-
StringSnowflakeId
-
-
Method Details
-
getEpoch
public long getEpoch()- Specified by:
getEpoch
in interfaceSnowflakeId
-
getTimestampBit
public int getTimestampBit()- Specified by:
getTimestampBit
in interfaceSnowflakeId
-
getMachineBit
public int getMachineBit()- Specified by:
getMachineBit
in interfaceSnowflakeId
-
getSequenceBit
public int getSequenceBit()- Specified by:
getSequenceBit
in interfaceSnowflakeId
-
getMaxTimestamp
public long getMaxTimestamp()- Specified by:
getMaxTimestamp
in interfaceSnowflakeId
-
getMaxMachineId
public int getMaxMachineId()- Specified by:
getMaxMachineId
in interfaceSnowflakeId
-
getMaxSequence
public long getMaxSequence()- Specified by:
getMaxSequence
in interfaceSnowflakeId
-
getLastTimestamp
public long getLastTimestamp()- Specified by:
getLastTimestamp
in interfaceSnowflakeId
-
getMachineId
public int getMachineId()- Specified by:
getMachineId
in interfaceSnowflakeId
-
stat
- Specified by:
stat
in interfaceIdGenerator
- Specified by:
stat
in interfaceIdGeneratorDecorator
- Specified by:
stat
in interfaceSnowflakeId
- Specified by:
stat
in interfaceStatistical
-