Enum CommitIdGenerator

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CUSTOM
      Provided by user
      RANDOM
      Non-blocking algorithm based on UUID.
      SYNCHRONIZED_SEQUENCE
      Generates neat, sequential commit identifiers.
    • Enum Constant Detail

      • RANDOM

        public static final CommitIdGenerator RANDOM
        Non-blocking algorithm based on UUID.

        Suitable for distributed applications.
        Warning! When RANDOM generator is set, Shadow query runner sorts commits by commitDateInstant. It means, that Shadow queries would be correct only if all application servers have synchronized clocks.
    • Method Detail

      • values

        public static CommitIdGenerator[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (CommitIdGenerator c : CommitIdGenerator.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CommitIdGenerator valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getComparator

        public abstract java.util.Comparator<CommitMetadata> getComparator()