Package org.rocksdb

Enum Class ReusedSynchronisationType

java.lang.Object
java.lang.Enum<ReusedSynchronisationType>
org.rocksdb.ReusedSynchronisationType
All Implemented Interfaces:
Serializable, Comparable<ReusedSynchronisationType>, Constable

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

    • MUTEX

      public static final ReusedSynchronisationType MUTEX
      Standard mutex.
    • 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.
    • THREAD_LOCAL

      public static final ReusedSynchronisationType THREAD_LOCAL
      There is a reused buffer per-thread.
  • Method Details

    • values

      public static ReusedSynchronisationType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ReusedSynchronisationType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      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:
      IllegalArgumentException - if an invalid value is provided.