Class RemoteQuery<T>

java.lang.Object
org.infinispan.query.dsl.impl.BaseQuery<T>
org.infinispan.client.hotrod.impl.query.RemoteQuery<T>
All Implemented Interfaces:
Iterable<T>, Query<T>, Query<T>

public final class RemoteQuery<T> extends BaseQuery<T>
Since:
6.0
Author:
anistor@redhat.com
  • Method Details

    • resetQuery

      public void resetQuery()
      Description copied from class: BaseQuery
      Reset internal state after pagination or query parameters are modified. This is needed to ensure the next execution of the query uses the new values.
      Specified by:
      resetQuery in class BaseQuery<T>
    • list

      public List<T> list()
      Description copied from interface: Query
      Returns the results of a search as a list.
      Returns:
      a list of objects that were found in the search.
    • execute

      public QueryResult<T> execute()
      Description copied from interface: Query
      Executes the query (a SELECT statement). Subsequent invocations cause the query to be re-executed.

      Executing a DELETE is also allowed. In this case, no results will be returned, but the number of affected entries will be returned as the hit count in the QueryResult.

      Returns:
      QueryResult with the results.
    • executeStatement

      public int executeStatement()
      Description copied from interface: Query
      Executes a data modifying statement (typically a DELETE) that does not return results; instead it returns the count of affected entries. This method cannot be used to execute a SELECT.

      NOTE: Paging parameters (firstResult/maxResults) are NOT allowed.

      Specified by:
      executeStatement in interface Query<T>
      Overrides:
      executeStatement in class BaseQuery<T>
      Returns:
      the number of affected (deleted) entries
    • iterator

      public CloseableIterator<T> iterator()
      Description copied from interface: Query
      Returns a CloseableIterator over the results. Close the iterator when you are done with processing the results.
      Returns:
      the results of the query as an iterator.
    • getResultSize

      public int getResultSize()
      Description copied from interface: Query
      Gets the total number of results matching the query, ignoring pagination (startOffset, maxResults).
      Returns:
      total number of results.
    • executeAsync

      public CompletionStage<QueryResult<T>> executeAsync()
    • executeStatementAsync

      public CompletionStage<Integer> executeStatementAsync()
    • listAsync

      public CompletionStage<List<T>> listAsync()
    • getSerializationContext

      public org.infinispan.protostream.SerializationContext getSerializationContext()
      Get the protobuf SerializationContext or null if we are not using protobuf.
    • getCache

      public RemoteCache<?,?> getCache()
    • toString

      public String toString()
      Overrides:
      toString in class Object