int total = pfers.size();
int match = 0;
int delivered = 0;
int ackno = 0;
for (int i=0; i < total; i ++) {
PacketReference ref = (PacketReference)pfers.get(i);
if (ref.matches(sid)) {
match ++;
if (ref.isAcknowledged(sid))
ackno ++;
if (ref.isDelivered(sid))
delivered ++;
}
}
String ID = match + " of " + total
+ "[ d=" + delivered
+ ", a=" + ackno + "]";
ht.put("Consumer[" +
String.valueOf(cuid.longValue())+ "]" , ID);
}
Set s = null;
synchronized(producers) {
s = new HashSet(producers.keySet());
}
itr = s.iterator();
Vector v = new Vector();
while (itr.hasNext()) {
ProducerUID cuid = (ProducerUID)itr.next();
v.add(String.valueOf(cuid.longValue()));
}
ht.put("Producers", v);
ht.put("_stored", String.valueOf(stored));
ht.put("_neverStore", String.valueOf(neverStore));
ht.put("_destvalid", String.valueOf(destvalid));
ht.put("_loaded", String.valueOf(loaded));
ht.put("_state", DestState.toString(state));
ht.put("producerMsgBatchSize", String.valueOf(producerMsgBatchSize));
ht.put("producerMsgBatchBytes", String.valueOf(producerMsgBatchBytes));
if (reconnectReaper != null)
ht.put("_reconnectReaper",reconnectReaper.toString());
ht.put("_clientReconnectInterval", String.valueOf(clientReconnectInterval));
ht.put("TrueType", DestType.toString(type));
if (id != null)
ht.put("ConnectionUID", String.valueOf(id.longValue()));
ht.put("activeProducerCount", String.valueOf(
producerFlow.activeProducerCnt()));
ht.put("pausedProducerCount", String.valueOf(
producerFlow.pausedProducerCnt()));
ht.put("pausedProducerSet", producerFlow.getDebugPausedProducers());
ht.put("activeProducerSet", producerFlow.getDebugActiveProducers());
List sysids = null;
ht.put("size", Integer.valueOf(size));
ht.put("bytes", Long.valueOf(bytes));
ht.put("remoteSize", Long.valueOf(remoteSize));
ht.put("remoteBytes", Long.valueOf(remoteBytes));
synchronized (destMessages) {
if (destMessages != null) {
ht.put("destMessagesSize", String.valueOf(destMessages.size()));
sysids = new ArrayList(destMessages.keySet());
}
}
if (sysids != null) {
itr = sysids.iterator();
v = new Vector();
PacketReference ref = null;
String refs = "null";
while (itr.hasNext()) {
SysMessageID sysid = (SysMessageID)itr.next();
ref = (PacketReference)destMessages.get(sysid);
refs = "null";
if (ref != null) {
refs = "local="+ref.isLocal()+",invalid="+ref.isInvalid()+
",destroyed="+ref.isDestroyed()+",overrided="+ref.isOverrided()+
",overriding="+ref.isOverriding()+",locked="+(ref.checkLock(false)==null);
}
v.add(sysid.toString()+" ref="+refs);
}
ht.put("Messages", v);
}