Package org.rocksdb
Enum Class ReusedSynchronisationType
- All Implemented Interfaces:
Serializable,Comparable<ReusedSynchronisationType>,Constable
Determines the type of synchronisation primitive used
in native code.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUse adaptive mutex, which spins in the user space before resorting to kernel.Standard mutex.There is a reused buffer per-thread. -
Method Summary
Modifier and TypeMethodDescriptionstatic ReusedSynchronisationTypegetReusedSynchronisationType(byte value) Get ReusedSynchronisationType by byte value.bytegetValue()Returns the byte value of the enumerations valuestatic ReusedSynchronisationTypeReturns the enum constant of this class with the specified name.static ReusedSynchronisationType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MUTEX
Standard mutex. -
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
There is a reused buffer per-thread.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getValue
public byte getValue()Returns the byte value of the enumerations value- Returns:
- byte representation
-
getReusedSynchronisationType
Get ReusedSynchronisationType by byte value.- Parameters:
value- byte representation of ReusedSynchronisationType.- Returns:
ReusedSynchronisationTypeinstance.- Throws:
IllegalArgumentException- if an invalid value is provided.
-