Class SystemResult

    • Constructor Detail

      • SystemResult

        public SystemResult()
    • Method Detail

      • getOperationState

        public SystemResult.State getOperationState()
        Returns the operation state.
        Returns:
        the state
      • getOperationId

        public String getOperationId()
        Returns the operation id for the operation if it was asynchronous. This is null if the request did not generate a new operation and/or the operation state is SystemResult.State.COMPLETE. The value can be used in SystemStatusRequest.setOperationId(java.lang.String) to get status and find potential errors resulting from the operation. This method is only useful for the result of asynchronous operations.
        Returns:
        the operation id or null if not set
      • getResultString

        public String getResultString()
        Returns the result string for the operation. This is null if the request was asynchronous or did not return an actual result. For example the "show" operations return a non-null result string, but "create, drop, grant, etc" operations return a null result string.
        Returns:
        the string
      • getStatement

        public String getStatement()
        Returns the statement used for the operation.
        Returns:
        the statement
      • waitForCompletion

        public void waitForCompletion​(NoSQLHandle handle,
                                      int waitMillis,
                                      int delayMillis)
        Waits for the operation to be complete. This is a blocking, polling style wait that delays for the specified number of milliseconds between each polling operation. This instance is modified with any changes in state.
        Parameters:
        handle - the NoSQLHandle to use
        waitMillis - the total amount of time to wait, in millseconds. This value must be non-zero and greater than delayMillis
        delayMillis - the amount of time to wait between polling attempts, in milliseconds. If 0 it will default to 500.
        Throws:
        IllegalArgumentException - if the operation times out or the parameters are not valid.
        NoSQLException - if the operation id used is unknown or the operation has failed.