Class MillisecondSnowflakeId

java.lang.Object
me.ahoo.cosid.snowflake.AbstractSnowflakeId
me.ahoo.cosid.snowflake.MillisecondSnowflakeId
All Implemented Interfaces:
IdGenerator, SnowflakeId, Statistical, StringIdGenerator

public class MillisecondSnowflakeId extends AbstractSnowflakeId
Millisecond SnowflakeId.
  • Field Details

    • DEFAULT_TIMESTAMP_BIT

      public static final int DEFAULT_TIMESTAMP_BIT
      See Also:
    • DEFAULT_MACHINE_BIT

      public static final int DEFAULT_MACHINE_BIT
      See Also:
    • DEFAULT_SEQUENCE_BIT

      public static final int DEFAULT_SEQUENCE_BIT
      See Also:
    • DEFAULT_SEQUENCE_RESET_THRESHOLD

      public static final long DEFAULT_SEQUENCE_RESET_THRESHOLD
      See Also:
  • Constructor Details

    • MillisecondSnowflakeId

      public MillisecondSnowflakeId(int machineId)
    • MillisecondSnowflakeId

      public MillisecondSnowflakeId(int machineBit, int machineId)
    • MillisecondSnowflakeId

      public MillisecondSnowflakeId(long epoch, int timestampBit, int machineBit, int sequenceBit, int machineId)
    • MillisecondSnowflakeId

      public MillisecondSnowflakeId(long epoch, int timestampBit, int machineBit, int sequenceBit, int machineId, long sequenceResetThreshold)
  • Method Details