/** * @return String representing the DistributedSystemMembership of the Client VM */ public String getMembershipID() { return this.proxyId.getDSMembership(); }
/** * returning Map of client queue size against client Id * * param clientMap is a Map of client queue size against ClientProxyMembershipID */ private Map getClientIDMap(Map ClientProxyMembershipIDMap) { Map clientIdMap = new HashMap(); Set entrySet = ClientProxyMembershipIDMap.entrySet(); Iterator entries = entrySet.iterator(); while (entries.hasNext()) { Map.Entry entry = (Map.Entry) entries.next(); ClientProxyMembershipID key = (ClientProxyMembershipID) entry.getKey(); Integer size = (Integer) entry.getValue(); clientIdMap.put(key.getDSMembership(), size); } return clientIdMap; }
private String getBaseRegionName() { String id = isDurable() ? getDurableId() : getDSMembership(); if (id.indexOf('/') >= 0) { id = id.replace('/', ':'); } StringBuffer buffer = new StringBuffer().append("_gfe_").append(isDurable() ? "" : "non_") .append("durable_client_").append("with_id_" + id).append("_").append(this.uniqueId); return buffer.toString(); }
/** * returns a string representation of this identifier, ignoring the toString cache */ public String toStringNoCache() { StringBuffer sb = new StringBuffer("identity(").append(getDSMembership()).append(",connection=") .append(uniqueId); if (identity != null) { DurableClientAttributes dca = getDurableAttributes(); if (dca.getId().length() > 0) { sb.append(",durableAttributes=").append(getDurableAttributes()).append(')').toString(); } } return sb.toString(); }
/** * @return Returns the serverCqName. */ @Override public String constructServerCqName(String cqName, ClientProxyMembershipID clientProxyId) { ConcurrentHashMap<ClientProxyMembershipID, String> cache = serverCqNameCache.computeIfAbsent(cqName, key -> new ConcurrentHashMap<>()); String cName = cache.get(clientProxyId); if (null == cName) { final StringBuilder sb = new StringBuilder(cqName).append("__"); if (clientProxyId.isDurable()) { sb.append(clientProxyId.getDurableId()); } else { sb.append(clientProxyId.getDSMembership()); } cName = sb.toString(); cache.put(clientProxyId, cName); } return cName; }
public Map<String, IncomingGatewayStatus> getConnectedIncomingGateways() { Map<String, IncomingGatewayStatus> connectedIncomingGateways = new HashMap<>(); synchronized (proxyIdConnections) { for (Map.Entry<ClientProxyMembershipID, ServerConnectionCollection> entry : proxyIdConnections .entrySet()) { ClientProxyMembershipID proxyID = entry.getKey(); Set<ServerConnection> connections = entry.getValue().getConnections(); for (ServerConnection sc : connections) { if (sc.getCommunicationMode().isWAN()) { IncomingGatewayStatus status = new IncomingGatewayStatus(proxyID.getDSMembership(), sc.getSocketAddress(), sc.getSocketPort()); connectedIncomingGateways.put(proxyID.getDSMembership(), status); } } } } return connectedIncomingGateways; }
ClientConnInfo clientConInfo = new ClientConnInfo(p.getProxyID(), p.getSocketHost(), p.getRemotePort(), p.isPrimary()); uniqueIds.put(p.getProxyID().getDSMembership(), clientConInfo); ClientProxyMembershipID clientId = conn.getProxyID(); if (clientId != null) { // Check added to fix bug 51987 if (uniqueIds.get(clientId.getDSMembership()) == null) { ClientConnInfo clientConInfo = new ClientConnInfo(conn.getProxyID(), conn.getSocketHost(), conn.getSocketPort(), false); uniqueIds.put(clientId.getDSMembership(), clientConInfo);
String clientIdFromProxy = ccp.getProxyID().getDSMembership(); if (clientIdFromProxy != null && clientIdFromProxy.equals(clientID)) { foundClientinCCP = true; ClientProxyMembershipID cliIdFrmProxy = conn.getProxyID(); if (clientID.equals(cliIdFrmProxy.getDSMembership())) { String durableId = cliIdFrmProxy.getDurableId(); clientInfo =
String clientName = proxyId.getDSMembership(); DistributedMember clientMemberId = proxyId.getDistributedMember(); status.setClientId(connInfo.toString());