Class QueryStatus

java.lang.Object
com.couchbase.analytics.client.java.QueryStatus

@ThreadSafe public class QueryStatus extends Object
  • Method Details

    • code

      public String code()
      Returns the value of the "status" field from the server response.

      Typically one of:

      • "queued"
      • "running"
      • "success"
      Note: This method is not expected to return a status code indicating failure, because QueryHandle.fetchStatus() throws an exception if the query failed.
    • metrics

      @Experimental public QueryMetrics metrics()
    • createdAt

      @Experimental public @Nullable Instant createdAt()
      Returns the query's creation time, or null if unknown.
    • resultReady

      public boolean resultReady()
      Returns true if query execution is complete, indicating it's safe to call resultHandle().
    • resultHandle

      public QueryResultHandle resultHandle()
      Returns a handle to the query result.
      Throws:
      IllegalStateException - if the result is not ready; see resultReady().
    • toString

      public String toString()
      Overrides:
      toString in class Object