public interface CqResults<E> extends SelectResults<E>
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")); }
Query.execute()
,
CqQuery.executeWithInitialResults()
asList, asSet, getCollectionType, isModifiable, occurrences, setElementType
Copyright © 1997-2017 Pivotal Software, Inc. All rights reserved.