use of org.apache.geode.cache.query.CqAttributesFactory in project geode by apache.
the class ClientCommandsDUnitTest method setupCqsOnVM.
private void setupCqsOnVM(VM vm) {
vm.invoke("setup CQs", () -> {
Cache cache = GemFireCacheImpl.getInstance();
QueryService qs = cache.getQueryService();
CqAttributesFactory cqAf = new CqAttributesFactory();
try {
qs.newCq(cq1, "select * from /" + regionName, cqAf.create(), true).execute();
qs.newCq(cq2, "select * from /" + regionName + " where id = 1", cqAf.create(), true).execute();
qs.newCq(cq3, "select * from /" + regionName + " where id > 2", cqAf.create(), true).execute();
cache.getLogger().info("setupCqs on vm created cqs = " + cache.getQueryService().getCqs().length);
} catch (Exception e) {
cache.getLogger().info("setupCqs on vm Exception " + CliUtil.stackTraceAsString(e));
}
return true;
});
}
Aggregations