public boolean done() { return ccn.getClientProxies().size() > 0; } public String description() {
public boolean done() { return ccn.getClientProxies().size() > 0; } public String description() {
public boolean done() { iter_prox = ccn.getClientProxies().iterator(); if(iter_prox.hasNext()) { proxy = (CacheClientProxy)iter_prox.next(); return proxy._messageDispatcher.isAlive(); } else { return false; } } public String description() {
public Set getAllClientSessions() { return new HashSet(getCacheClientNotifier().getClientProxies()); }
public boolean done() { return bs.getAcceptor().getCacheClientNotifier().getClientProxies().size() != 1; } public String description() {
public static CacheClientProxy getClientProxy() { // Get the CacheClientNotifier CacheClientNotifier notifier = getBridgeServer().getAcceptor() .getCacheClientNotifier(); // Get the CacheClientProxy or not (if proxy set is empty) CacheClientProxy proxy = null; Iterator i = notifier.getClientProxies().iterator(); if (i.hasNext()) { proxy = (CacheClientProxy) i.next(); } return proxy; }
public static CacheClientProxy getClientProxy() { // Get the CacheClientNotifier CacheClientNotifier notifier = getBridgeServer().getAcceptor() .getCacheClientNotifier(); // Get the CacheClientProxy or not (if proxy set is empty) CacheClientProxy proxy = null; Iterator i = notifier.getClientProxies().iterator(); if (i.hasNext()) { proxy = (CacheClientProxy) i.next(); } return proxy; }
private static CacheClientProxy getClientProxy() { // Get the CacheClientNotifier CacheClientNotifier notifier = getBridgeServer().getAcceptor() .getCacheClientNotifier(); // Get the CacheClientProxy or not (if proxy set is empty) CacheClientProxy proxy = null; Iterator i = notifier.getClientProxies().iterator(); if (i.hasNext()) { proxy = (CacheClientProxy) i.next(); } return proxy; }
private static CacheClientProxy getClientProxy() { // Get the CacheClientNotifier CacheClientNotifier notifier = getBridgeServer().getAcceptor() .getCacheClientNotifier(); // Get the CacheClientProxy or not (if proxy set is empty) CacheClientProxy proxy = null; Iterator i = notifier.getClientProxies().iterator(); if (i.hasNext()) { proxy = (CacheClientProxy)i.next(); } return proxy; }
protected static CacheClientProxy getClientProxy() { // Get the CacheClientNotifier CacheClientNotifier notifier = getBridgeServer().getAcceptor() .getCacheClientNotifier(); // Get the CacheClientProxy or not (if proxy set is empty) CacheClientProxy proxy = null; Iterator i = notifier.getClientProxies().iterator(); if (i.hasNext()) { proxy = (CacheClientProxy) i.next(); } return proxy; }
/** * Assert all queues are empty to aid later assertion for listener event counts. */ public static void assertAllQueuesEmpty() { Iterator servers = cacheServer.getBridgeServers().iterator(); while (servers.hasNext()) { Iterator proxies = ((BridgeServerImpl)servers.next()).getAcceptor(). getCacheClientNotifier().getClientProxies().iterator(); while (proxies.hasNext()) { int qsize = ((CacheClientProxy)proxies.next()).getQueueSize(); assertTrue("Queue size expected to be zero but is " + qsize, qsize == 0); } } }
protected static int getNumberOfClientProxies() { return getBridgeServer().getAcceptor().getCacheClientNotifier() .getClientProxies().size(); }
protected static int getNumberOfClientProxies() { return getBridgeServer().getAcceptor().getCacheClientNotifier() .getClientProxies().size(); }
private static int getNumberOfClientProxies() { return getBridgeServer().getAcceptor().getCacheClientNotifier() .getClientProxies().size(); } /*
private static int getNumberOfClientProxies() { return getBridgeServer().getAcceptor().getCacheClientNotifier() .getClientProxies().size(); } /*
public static void verifyDeltaSent(Integer deltas) { CacheClientNotifier ccn = ((BridgeServerImpl)cache .getCacheServers().toArray()[0]).getAcceptor() .getCacheClientNotifier(); int numOfDeltasSent = ((CacheClientProxy)ccn.getClientProxies().toArray()[0]) .getStatistics().getDeltaMessagesSent(); assertTrue("Expected " + deltas + " deltas to be sent but " + numOfDeltasSent + " were sent.", numOfDeltasSent == deltas); }
public static void verifyDeltaSent(Integer deltas) { CacheClientNotifier ccn = ((BridgeServerImpl)cache .getCacheServers().toArray()[0]).getAcceptor() .getCacheClientNotifier(); int numOfDeltasSent = ((CacheClientProxy)ccn.getClientProxies().toArray()[0]) .getStatistics().getDeltaMessagesSent(); assertTrue("Expected " + deltas + " deltas to be sent but " + numOfDeltasSent + " were sent.", numOfDeltasSent == deltas); }
public static Set getCacheClientProxies() { Cache c = CacheFactory.getAnyInstance(); assertEquals("More than one BridgeServer", 1, c.getBridgeServers().size()); BridgeServerImpl bs = (BridgeServerImpl)c.getBridgeServers().iterator() .next(); assertNotNull(bs); assertNotNull(bs.getAcceptor()); assertNotNull(bs.getAcceptor().getCacheClientNotifier()); return new HashSet(bs.getAcceptor().getCacheClientNotifier().getClientProxies()); }
public static void verifyNoCCP() { assertEquals("More than one BridgeServer", 1, cache.getBridgeServers() .size()); BridgeServerImpl bs = (BridgeServerImpl)cache.getBridgeServers() .iterator().next(); assertNotNull(bs); assertNotNull(bs.getAcceptor()); assertNotNull(bs.getAcceptor().getCacheClientNotifier()); // no client is connected to this server assertTrue(0 == bs.getAcceptor().getCacheClientNotifier() .getClientProxies().size()); }
public static synchronized void updateBBWithServerVMNames() { int myVMid = RemoteTestModule.getMyVmid(); ClientVmInfo myInfo = new ClientVmInfo(new Integer(myVMid), RemoteTestModule.getMyClientName(), null); Collection<CacheClientProxy> coll = CacheClientNotifier.getInstance() .getClientProxies(); if (coll.size() > 0) { VMotionBB.getBB().getSharedMap().put(myInfo.getClientName(), myInfo); Log.getLogWriter().info("server vm name is ::" + myInfo.getClientName()); } }