Package org.rocksdb

Enum ReusedSynchronisationType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ReusedSynchronisationType>

    public enum ReusedSynchronisationType
    extends java.lang.Enum<ReusedSynchronisationType>
    Determines the type of synchronisation primitive used in native code.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ADAPTIVE_MUTEX
      Use adaptive mutex, which spins in the user space before resorting to kernel.
      MUTEX
      Standard mutex.
      THREAD_LOCAL
      There is a reused buffer per-thread.
    • Enum Constant Detail

      • ADAPTIVE_MUTEX

        public static final ReusedSynchronisationType ADAPTIVE_MUTEX
        Use adaptive mutex, which spins in the user space before resorting to kernel. This could reduce context switch when the mutex is not heavily contended. However, if the mutex is hot, we could end up wasting spin time.
    • Method Detail

      • values

        public static ReusedSynchronisationType[] 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 (ReusedSynchronisationType c : ReusedSynchronisationType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ReusedSynchronisationType 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
      • getValue

        public byte getValue()
        Returns the byte value of the enumerations value
        Returns:
        byte representation
      • getReusedSynchronisationType

        public static ReusedSynchronisationType getReusedSynchronisationType​(byte value)
        Get ReusedSynchronisationType by byte value.
        Parameters:
        value - byte representation of ReusedSynchronisationType.
        Returns:
        ReusedSynchronisationType instance.
        Throws:
        java.lang.IllegalArgumentException - if an invalid value is provided.