Package org.rocksdb
Class ThreadStatus
java.lang.Object
org.rocksdb.ThreadStatus
-
Method Summary
Modifier and TypeMethodDescriptionThe name of the Column Family that the thread is currently involved with.The name of the DB instance that the thread is currently involved with.longGet the elapsed time of the current thread operation in microseconds.static StringgetOperationName(OperationType operationType) Get the name of an operation given its type.long[]Get the list of properties that describe some details about the current operation.static StringgetOperationPropertyName(OperationType operationType, int i) Obtain the name of the "i"th operation property of the specified operation.Get the current stage where the thread is involved in the current operation.static StringgetOperationStageName(OperationStage operationStage) Obtain a human-readable string describing the specified operation stage.Get the operation (high-level action) that the current thread is involved with.static StringgetStateName(StateType stateType) Obtain the name of a state given its type.Get the state (lower-level action) that the current thread is involved with.longGet the unique ID of the thread.Get the type of the thread.static StringgetThreadTypeName(ThreadType threadType) Get the name of the thread type.interpretOperationProperties(OperationType operationType, long[] operationProperties) Translate the "i"th property of the specified operation given a property value.static StringmicrosToString(long operationElapsedTime)
-
Method Details
-
getThreadId
public long getThreadId()Get the unique ID of the thread.- Returns:
- the thread id
-
getThreadType
Get the type of the thread.- Returns:
- the type of the thread.
-
getDbName
The name of the DB instance that the thread is currently involved with.- Returns:
- the name of the db, or null if the thread is not involved in any DB operation.
-
getCfName
The name of the Column Family that the thread is currently involved with.- Returns:
- the name of the db, or null if the thread is not involved in any column Family operation.
-
getOperationType
Get the operation (high-level action) that the current thread is involved with.- Returns:
- the operation
-
getOperationElapsedTime
public long getOperationElapsedTime()Get the elapsed time of the current thread operation in microseconds.- Returns:
- the elapsed time
-
getOperationStage
Get the current stage where the thread is involved in the current operation.- Returns:
- the current stage of the current operation
-
getOperationProperties
public long[] getOperationProperties()Get the list of properties that describe some details about the current operation.Each field in might have different meanings for different operations.
- Returns:
- the properties
-
getStateType
Get the state (lower-level action) that the current thread is involved with.- Returns:
- the state
-
getThreadTypeName
Get the name of the thread type.- Parameters:
threadType- the thread type- Returns:
- the name of the thread type.
-
getOperationName
Get the name of an operation given its type.- Parameters:
operationType- the type of operation.- Returns:
- the name of the operation.
-
microsToString
-
getOperationStageName
Obtain a human-readable string describing the specified operation stage.- Parameters:
operationStage- the stage of the operation.- Returns:
- the description of the operation stage.
-
getOperationPropertyName
Obtain the name of the "i"th operation property of the specified operation.- Parameters:
operationType- the operation type.i- the index of the operation property.- Returns:
- the name of the operation property
-
interpretOperationProperties
public static Map<String,Long> interpretOperationProperties(OperationType operationType, long[] operationProperties) Translate the "i"th property of the specified operation given a property value.- Parameters:
operationType- the operation type.operationProperties- the operation properties.- Returns:
- the property values.
-
getStateName
Obtain the name of a state given its type.- Parameters:
stateType- the state type.- Returns:
- the name of the state.
-