Interface CqResults<E>

  • All Superinterfaces:
    java.util.Collection<E>, java.lang.Iterable<E>, SelectResults<E>

    public interface CqResults<E>
    extends SelectResults<E>
    Represents the results of a CQ query that is executed using CqQuery.executeWithInitialResults() The result will contain the instances of Struct having key and value of the region entry that satisfy the CQ query condition.
     ClientCache cache = ...
     QueryService queryService = PoolManager.find("client").getQueryService();
     CqAttributesFactory cqAf = new CqAttributesFactory();
     CqAttributes cqa = cqAf.create();
    
     String cqQueryStr = "SELECT * FROM /root/employees " +
       "WHERE salary > 50000";
    
     CqQuery cq = queryService.newCq("MyCq", cqQueryStr, cqa);
     CqResults results = cq.executeWithInitialResults();
    
     for (Object o : results.asList()) {
       Struct s = (Struct)o;
       System.out.println("key : " + s.get("key") + " value : " + s.get("value"));
     }
    
     
    Since:
    GemFire 6.5
    See Also:
    Query.execute(), CqQuery.executeWithInitialResults()
    • Method Summary

      • Methods inherited from interface java.util.Collection

        add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach