Class QueryRequestFuture

java.lang.Object
de.calamanari.pk.activeobject.QueryRequestFuture

public class QueryRequestFuture
extends java.lang.Object
Query Request Future - allows the client to check the status and finally to retrieve the result of the scheduled operation.
Author:
Karl Eilebrecht
  • Field Summary

    Fields
    Modifier and Type Field Description
    static java.util.List<java.lang.String[]> NO_RESULT
    NULL-OBJECT to represent the case that there was no result
  • Constructor Summary

    Constructors
    Constructor Description
    QueryRequestFuture​(QueryRequest queryRequest)
    Creates a new Future based on the request data
  • Method Summary

    Modifier and Type Method Description
    void cancelQuery()
    Cancels the query
    java.util.List<java.lang.String[]> getResult()
    Returns the result if - and only if computation is done, otherwise null (non-blocking)
    boolean isQueryCancelled()
    Determines whether the query is cancelled
    boolean isQueryDone()
    Determines whether the query has finished

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NO_RESULT

      public static final java.util.List<java.lang.String[]> NO_RESULT
      NULL-OBJECT to represent the case that there was no result
  • Constructor Details

    • QueryRequestFuture

      public QueryRequestFuture​(QueryRequest queryRequest)
      Creates a new Future based on the request data
      Parameters:
      queryRequest - objectified request which has to be observed
  • Method Details

    • getResult

      public java.util.List<java.lang.String[]> getResult()
      Returns the result if - and only if computation is done, otherwise null (non-blocking)
      Returns:
      result or NO_RESULT (if not completed or cancelled)
    • cancelQuery

      public void cancelQuery()
      Cancels the query
    • isQueryCancelled

      public boolean isQueryCancelled()
      Determines whether the query is cancelled
      Returns:
      true if this query is cancelled
    • isQueryDone

      public boolean isQueryDone()
      Determines whether the query has finished
      Returns:
      true if this query is done