@Override public String toString() { return this.id.toString() + ",Principal:" + (this.principal == null ? "" : this.principal.getName()); }
@Override public String toString() { return (this.id == null ? "ClientProxyMembershipID not available" : id.toString()) + ",Principal:" + (this.principal == null ? "" : this.principal.getName()); }
@Override protected void appendFields(StringBuilder buff) { super.appendFields(buff); buff.append("; membershipID="); buff.append(this.context == null ? "" : this.context.toString()); }
@Override protected void appendFields(StringBuilder buff) { super.appendFields(buff); buff.append("; membershipID="); buff.append(this.context == null ? "" : this.context.toString()); }
@Override protected void appendFields(StringBuilder buff) { super.appendFields(buff); buff.append("; membershipID="); buff.append(this.context == null ? "" : this.context.toString()); }
@Override protected void appendFields(StringBuilder buff) { super.appendFields(buff); buff.append("; membershipID="); buff.append(this.context == null ? "" : this.context.toString()); }
@Override public String toString() { StringBuffer buf = new StringBuffer() .append("HandShake@") .append(System.identityHashCode(this)) .append(" code: ") .append(this.code); if (this.id != null) { buf.append(" identity: "); /*for(int i=0; i<this.identity.length; ++i) { buf.append(this.identity[i]); }*/ buf.append(this.id.toString()); } return buf.toString(); }
@Override public String toString() { StringBuffer buf = new StringBuffer() .append("HandShake@") .append(System.identityHashCode(this)) .append(" code: ") .append(this.code); if (this.id != null) { buf.append(" identity: "); /*for(int i=0; i<this.identity.length; ++i) { buf.append(this.identity[i]); }*/ buf.append(this.id.toString()); } return buf.toString(); }
public static void VerifyClientProxyOnServerBeforeClose() { Cache c = CacheFactory.getAnyInstance(); assertEquals("More than one BridgeServer", 1, c.getBridgeServers().size()); final BridgeServerImpl bs = (BridgeServerImpl) c.getBridgeServers().iterator().next(); WaitCriterion ev = new WaitCriterion() { public boolean done() { return bs.getAcceptor().getCacheClientNotifier().getClientProxies().size() == 1; } public String description() { return null; } }; DistributedTestCase.waitForCriterion(ev, 15 * 1000, 200, true); assertEquals(1, bs.getAcceptor().getCacheClientNotifier().getClientProxies().size()); Iterator iter = bs.getAcceptor().getCacheClientNotifier().getClientProxies().iterator(); if (iter.hasNext()) { CacheClientProxy proxy = (CacheClientProxy)iter.next(); clientMembershipId = proxy.getProxyID().toString(); assertNotNull(proxy.getHARegion()); } }
if (HaHelper.checkPrimary(proxy)) { ClientProxyMembershipID proxyID = proxy.getProxyID(); Log.getLogWriter().info("Proxy id : " + proxyID.toString()); HARegion region = (HARegion) proxy.getHARegion(); HARegionQueue haRegionQueue = HAHelper.getRegionQueue(region); haRegionQueue).getNumVoidRemovals())); Log.getLogWriter().info("new StatssMap : " + statMap.toString()); HAClientQueueBB.getBB().getSharedMap().put(proxyID.toString(), statMap); HAClientQueueBB.getBB().getSharedCounters().add( HAClientQueueBB.NUM_GLOBAL_CONFLATE,
/** * This task is for the client Q conflation tests. This is to verify that no * conflation happened for this client events. */ public static void verifyNoConflation() { PoolImpl pool = HAClientQueue.mypool; ClientProxyMembershipID cpm = pool.getProxyID(); String proxyIdStr = cpm.toString(); Log.getLogWriter().info("Proxy String : " + proxyIdStr); HashMap mp = (HashMap)HAClientQueueBB.getBB().getSharedMap() .get(proxyIdStr); Long numOfPuts = (Long)mp.get("eventsPut"); Long numOfConflated = (Long)mp.get("eventsConflated"); Long numOfMissRemovals = (Long)mp.get("numVoidRemovals"); Log.getLogWriter().info("value of numOfConflated : " + numOfConflated); long totalConflation = HAClientQueueBB.getBB().getSharedCounters().read( HAClientQueueBB.NUM_GLOBAL_CONFLATE); Log.getLogWriter().info("Total Conflation : " + totalConflation); if (!numOfConflated.equals(new Long(0))) { throw new TestException("Expected no conflation to happen but has " + numOfConflated + " events"); } }
/** * The following task is used for client Q conflation tests. Similar to * checkForConflation task but the task fails if the individual client events * are not conflated. (checkForConflation validation pass if there is atleast * one event conflated in the total test. */ public static void checkClientConflation() { PoolImpl pool = HAClientQueue.mypool; ClientProxyMembershipID cpm = pool.getProxyID(); String proxyIdStr = cpm.toString(); Log.getLogWriter().info("Proxy String : " + proxyIdStr); HashMap mp = (HashMap)HAClientQueueBB.getBB().getSharedMap() .get(proxyIdStr); Long numOfPuts = (Long)mp.get("eventsPut"); Long numOfConflated = (Long)mp.get("eventsConflated"); Long numOfMissRemovals = (Long)mp.get("numVoidRemovals"); Log.getLogWriter().info("value of numOfConflated : " + numOfConflated); long totalConflation = HAClientQueueBB.getBB().getSharedCounters().read( HAClientQueueBB.NUM_GLOBAL_CONFLATE); Log.getLogWriter().info("Total Conflation : " + totalConflation); if (numOfConflated.equals(new Long(0))) { throw new TestException("No conflation done - Test Issue - needs tuning "); } }
if (HaHelper.checkPrimary(proxy)) { ClientProxyMembershipID proxyID = proxy.getProxyID(); Log.getLogWriter().info("Proxy id : " + proxyID.toString()); HARegion region = (HARegion) proxy.getHARegion(); HARegionQueue haRegionQueue = HAHelper.getRegionQueue(region); haRegionQueue).getNumVoidRemovals())); Log.getLogWriter().info("StatMap : " + statMap.toString()); String proxyIdStr = proxyID.toString();
public static void checkForConflation() { PoolImpl proxy = HAClientQueue.mypool; ClientProxyMembershipID cpm = proxy.getProxyID(); String proxyIdStr = cpm.toString(); Log.getLogWriter().info("Proxy String : " + proxyIdStr); if (DistributedSystemHelper.getGemFireDescription() .getEnableNetworkPartitionDetection()) { proxyIdStr = proxyIdStr.substring(proxyIdStr.lastIndexOf("(") + 1, proxyIdStr.indexOf(":")); } HashMap mp = (HashMap)HAClientQueueBB.getBB().getSharedMap() .get(proxyIdStr); Long numOfPuts = (Long)mp.get("eventsPut"); Long numOfConflated = (Long)mp.get("eventsConflated"); Long numOfMissRemovals = (Long)mp.get("numVoidRemovals"); Log.getLogWriter().info("value of numOfConflated : " + numOfConflated); long totalConflation = HAClientQueueBB.getBB().getSharedCounters().read( HAClientQueueBB.NUM_GLOBAL_CONFLATE); Log.getLogWriter().info("Total Conflation : " + totalConflation); if (totalConflation == 0) { throw new TestException( "No conflation done - Test Issue - needs tuning "); } }
String proxyIdStr = cpm.toString(); Log.getLogWriter().info("Proxy String : " + proxyIdStr);
/** * This task is for the client Q conflation tests. This is to verify that * conflation do happened for this client events.(checks for individual * clients not just the total. */ public static void verifyIndividualConflation() { ClientProxyMembershipID cpm = myPool.getProxyID(); String proxyIdStr = cpm.toString(); Log.getLogWriter().info("Proxy String : " + proxyIdStr); HashMap mp = (HashMap)DurableClientsBB.getBB().getSharedMap().get( proxyIdStr); Log.getLogWriter().info(mp.toString()); Long numOfConflated = (Long)mp.get("eventsConflated"); Log.getLogWriter().info("value of numOfConflated : " + numOfConflated); long totalConflation = DurableClientsBB.getBB().getSharedCounters().read( DurableClientsBB.NUM_GLOBAL_CONFLATE); Log.getLogWriter().info("Total Conflation : " + totalConflation); if (numOfConflated.equals(new Long(0))) { throw new TestException( "Expected conflation to happen but has it did not happen"); } }
/** * This task is for the client Q conflation tests. This is to verify that no * conflation happened for this client events. */ public static void verifyNoConflation() { ClientProxyMembershipID cpm = myPool.getProxyID(); String proxyIdStr = cpm.toString(); Log.getLogWriter().info("Proxy String : " + proxyIdStr); HashMap mp = (HashMap)DurableClientsBB.getBB().getSharedMap().get( proxyIdStr); Log.getLogWriter().info(mp.toString()); Long numOfConflated = (Long)mp.get("eventsConflated"); Log.getLogWriter().info("value of numOfConflated : " + numOfConflated); long totalConflation = DurableClientsBB.getBB().getSharedCounters().read( DurableClientsBB.NUM_GLOBAL_CONFLATE); Log.getLogWriter().info("Total Conflation : " + totalConflation); if (!numOfConflated.equals(new Long(0))) { throw new TestException("Expected no conflation to happen but has " + numOfConflated + " events"); } }
if (HaHelper.checkPrimary(proxy)) { ClientProxyMembershipID proxyID = proxy.getProxyID(); Log.getLogWriter().info("Proxy id : " + proxyID.toString()); HARegion region = (HARegion)proxy.getHARegion(); HARegionQueue haRegionQueue = HAHelper.getRegionQueue(region); .getEventsEnqued())); DurableClientsBB.getBB().getSharedMap() .put(proxyID.toString(), statMap); DurableClientsBB.getBB().getSharedCounters().add( DurableClientsBB.NUM_GLOBAL_CONFLATE,