public void run2() throws CacheException { long compiledQueryCount = CacheClientNotifier.getInstance().getStats().getCompiledQueryCount(); assertEquals(queryString.length, compiledQueryCount); } });
public void run2() throws CacheException { long compiledQueryCount = CacheClientNotifier.getInstance().getStats().getCompiledQueryCount(); assertEquals(queryString.length, compiledQueryCount); } });
public void run2() throws CacheException { long compiledQueryCount = CacheClientNotifier.getInstance().getStats().getCompiledQueryCount(); assertEquals(queryString.length, compiledQueryCount); } });
public void run2() throws CacheException { long compiledQueryCount = CacheClientNotifier.getInstance().getStats().getCompiledQueryCount(); assertEquals(queryString.length, compiledQueryCount); } });
public void run2() throws CacheException { long compiledQueryUsedCount = CacheClientNotifier.getInstance().getStats().getCompiledQueryUsedCount(); int numTimesUsed = (useMaintainedCompiledQueries + 1) * queryString.length; assertEquals(numTimesUsed, compiledQueryUsedCount); } });
public void run2() throws CacheException { long compiledQueryCount = CacheClientNotifier.getInstance().getStats().getCompiledQueryCount(); assertEquals(queryString.length, compiledQueryCount); } });
public void run2() throws CacheException { long compiledQueryCount = CacheClientNotifier.getInstance().getStats().getCompiledQueryCount(); assertEquals(queryString.length, compiledQueryCount); } });
public void run2() throws CacheException { long compiledQueryCount = CacheClientNotifier.getInstance().getStats().getCompiledQueryCount(); assertEquals(queryString.length, compiledQueryCount); } });
public void run2() throws CacheException { long compiledQueryCount = CacheClientNotifier.getInstance().getStats().getCompiledQueryCount(); assertEquals(queryString.length, compiledQueryCount); } });
public void run2() throws CacheException { long compiledQueryCount = CacheClientNotifier.getInstance().getStats().getCompiledQueryCount(); assertEquals(0, compiledQueryCount); } });
public void run2() throws CacheException { long compiledQueryCount = CacheClientNotifier.getInstance().getStats().getCompiledQueryCount(); assertEquals(queryString.length, compiledQueryCount); } });
public void run2() throws CacheException { long count = 0; for (int i=0; i < 100; i++) { count = CacheClientNotifier.getInstance().getStats().getCompiledQueryCount(); if (count == compiledQueryCount){ break; } else { pause(1 * 100); } } assertEquals(compiledQueryCount, count); } });
public void run2() throws CacheException { long compiledQueryUsedCount = -1; while (true) { getLogWriter().info("### CompiledQueryUsedCount :" + compiledQueryUsedCount); if (compiledQueryUsedCount == CacheClientNotifier.getInstance().getStats().getCompiledQueryUsedCount()) { getLogWriter().info("### previous and current CompiledQueryUsedCounts are same :" + compiledQueryUsedCount); break; } else { compiledQueryUsedCount = CacheClientNotifier.getInstance().getStats().getCompiledQueryUsedCount(); try { Thread.currentThread().sleep(3 * 1000); } catch (Exception ex) { break; } } } } });
public void run2() throws CacheException { for (Iterator bi = getCache().getCacheServers().iterator(); bi.hasNext(); ) { BridgeServerImpl bsi = (BridgeServerImpl) bi.next(); final CacheClientNotifierStats ccnStats = bsi.getAcceptor().getCacheClientNotifier().getStats(); WaitCriterion ev = new WaitCriterion() { public boolean done() { return ccnStats.getClientRegisterRequests() == ccnStats.getClientUnRegisterRequests(); } public String description() { return null; } }; DistributedTestCase.waitForCriterion(ev, 62 * 1000, 200, true); assertEquals("HealthMonitor Client Register/UnRegister mismatch.", ccnStats.getClientRegisterRequests(), ccnStats.getClientUnRegisterRequests()); } } };
public void run2() throws CacheException { long compiledQueryUsedCount = -1; while (true) { getLogWriter().info("### previous CompiledQueryUsedCount :" + compiledQueryUsedCount); if (compiledQueryUsedCount == CacheClientNotifier.getInstance().getStats().getCompiledQueryUsedCount()) { getLogWriter().info("### previous and current CompiledQueryUsedCounts are same :" + compiledQueryUsedCount); break; } else { compiledQueryUsedCount = CacheClientNotifier.getInstance().getStats().getCompiledQueryUsedCount(); try { Thread.currentThread().sleep(3 * 1000); } catch (Exception ex) { break; } } } } });
/** Function to verify compiled query size */ public static void verifyCompiledQueries() { Log.getLogWriter().info("Verifying compiled queryies."); long compiledQueryCount = 0; for (int i=0; i < 10; i++){ // Wait for sometime. So that the cleanup thread completes its job. compiledQueryCount = CacheClientNotifier.getInstance().getStats().getCompiledQueryCount(); if (compiledQueryCount <= 0) { break; } try { Thread.sleep(2000); } catch (Exception ex){} } if (compiledQueryCount > 0){ throw new TestException("Compiled Queries are not completely cleared. " + "Number of compiled queries present are: " + compiledQueryCount); } }
public static void checkStatistics() { try { Cache cache = CacheServerTestUtil.getCache(); com.gemstone.gemfire.LogWriter logger = cache.getLogger(); BridgeServerImpl currentServer = (BridgeServerImpl)(new ArrayList(cache .getBridgeServers()).get(0)); AcceptorImpl ai = currentServer.getAcceptor(); CacheClientNotifier notifier = ai.getCacheClientNotifier(); CacheClientNotifierStats stats = notifier.getStats(); logger.info("Stats:" + "\nDurableReconnectionCount:" + stats.get_durableReconnectionCount() + "\nQueueDroppedCount" + stats.get_queueDroppedCount() + "\nEventsEnqueuedWhileClientAwayCount" + stats.get_eventEnqueuedWhileClientAwayCount()); } catch (Exception e) { fail("Exception thrown while executing checkStatistics()"); } }
public void run2() throws CacheException { CacheClientNotifier ccn = CacheClientNotifier.getInstance(); final CacheClientNotifierStats ccnStats = ccn.getStats(); final int eventCount = ccnStats.getEvents(); Region r = getRootRegion(name);
public static void checkStatisticsWithExpectedValues(int reconnectionCount, int queueDropCount, int enqueueCount) { try { Cache cache = CacheServerTestUtil.getCache(); com.gemstone.gemfire.LogWriter logger = cache.getLogger(); BridgeServerImpl currentServer = (BridgeServerImpl)(new ArrayList(cache .getBridgeServers()).get(0)); AcceptorImpl ai = currentServer.getAcceptor(); CacheClientNotifier notifier = ai.getCacheClientNotifier(); CacheClientNotifierStats stats = notifier.getStats(); logger.info("Stats:" + "\nDurableReconnectionCount:" + stats.get_durableReconnectionCount() + "\nQueueDroppedCount" + stats.get_queueDroppedCount() + "\nEventsEnqueuedWhileClientAwayCount" + stats.get_eventEnqueuedWhileClientAwayCount()); assertEquals(reconnectionCount, stats.get_durableReconnectionCount()); assertEquals(queueDropCount, stats.get_queueDroppedCount()); assertEquals(enqueueCount, stats.get_eventEnqueuedWhileClientAwayCount()); } catch (Exception e) { fail("Exception thrown while executing checkStatisticsWithExpectedValues()"); } }
ccn.addCompiledQuery((DefaultQuery)query); ccn.getStats().incCompiledQueryUsedCount(1); ((DefaultQuery)query).setLastUsed(true); } else {