Package org.rocksdb

Class ThreadStatus


  • public class ThreadStatus
    extends java.lang.Object
    • Method Detail

      • getThreadId

        public long getThreadId()
        Get the unique ID of the thread.
        Returns:
        the thread id
      • getThreadType

        public ThreadType getThreadType()
        Get the type of the thread.
        Returns:
        the type of the thread.
      • getDbName

        public java.lang.String 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

        public java.lang.String 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

        public OperationType 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

        public OperationStage 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

        public StateType getStateType()
        Get the state (lower-level action) that the current thread is involved with.
        Returns:
        the state
      • getThreadTypeName

        public static java.lang.String getThreadTypeName​(ThreadType threadType)
        Get the name of the thread type.
        Parameters:
        threadType - the thread type
        Returns:
        the name of the thread type.
      • getOperationName

        public static java.lang.String getOperationName​(OperationType operationType)
        Get the name of an operation given its type.
        Parameters:
        operationType - the type of operation.
        Returns:
        the name of the operation.
      • microsToString

        public static java.lang.String microsToString​(long operationElapsedTime)
      • getOperationStageName

        public static java.lang.String getOperationStageName​(OperationStage operationStage)
        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

        public static java.lang.String getOperationPropertyName​(OperationType operationType,
                                                                int i)
        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 java.util.Map<java.lang.String,​java.lang.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

        public static java.lang.String getStateName​(StateType stateType)
        Obtain the name of a state given its type.
        Parameters:
        stateType - the state type.
        Returns:
        the name of the state.