Class SecondSnowflakeId

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

public class SecondSnowflakeId extends AbstractSnowflakeId
Second 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

    • SecondSnowflakeId

      public SecondSnowflakeId(int machineId)
    • SecondSnowflakeId

      public SecondSnowflakeId(int machineBit, int machineId)
    • SecondSnowflakeId

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

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