Package org.rocksdb
Enum ReusedSynchronisationType
- java.lang.Object
-
- java.lang.Enum<ReusedSynchronisationType>
-
- org.rocksdb.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_MUTEXUse adaptive mutex, which spins in the user space before resorting to kernel.MUTEXStandard mutex.THREAD_LOCALThere is a reused buffer per-thread.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ReusedSynchronisationTypegetReusedSynchronisationType(byte value)Get ReusedSynchronisationType by byte value.bytegetValue()Returns the byte value of the enumerations valuestatic ReusedSynchronisationTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ReusedSynchronisationType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 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 namejava.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:
ReusedSynchronisationTypeinstance.- Throws:
java.lang.IllegalArgumentException- if an invalid value is provided.
-
-