Interface DSnowflake.Builder

  • Enclosing interface:
    DSnowflake

    public static interface DSnowflake.Builder
    Builder used to create custom DSnowflakes.
    • Method Detail

      • withEpochStart

        DSnowflake.Builder withEpochStart​(long epochStart)
        Specify a custom epoch start
        Parameters:
        epochStart - a custom epoch start
        Returns:
        this builder
      • withMachineId

        DSnowflake.Builder withMachineId​(long machineId)
        Specify a custom machine ID
        Parameters:
        machineId - a custom machine ID
        Returns:
        this builder
      • withMachineBits

        DSnowflake.Builder withMachineBits​(int machineBits)
        Specify the number of bits to use for the machine ID
        Parameters:
        machineBits - bits to use for the machine ID
        Returns:
        this builder
      • withSequenceBits

        DSnowflake.Builder withSequenceBits​(int sequenceBits)
        Specify the number of bits to use for the sequence number
        Parameters:
        sequenceBits - buts to use for the sequence number
        Returns:
        this builder
      • build

        DSnowflake build()
        Create a DSnowflake instance
        Returns:
        a new DSnowflake instance