protected void ping(QuorumPacket qp) throws IOException { // Send back the ping with our session data ByteArrayOutputStream bos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(bos); Map<Long, Integer> touchTable = zk.getTouchSnapshot(); for (Entry<Long, Integer> entry : touchTable.entrySet()) { dos.writeLong(entry.getKey()); dos.writeInt(entry.getValue()); } qp.setData(bos.toByteArray()); writePacket(qp, true); }
protected void ping(QuorumPacket qp) throws IOException { // Send back the ping with our session data ByteArrayOutputStream bos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(bos); HashMap<Long, Integer> touchTable = zk .getTouchSnapshot(); for (Entry<Long, Integer> entry : touchTable.entrySet()) { dos.writeLong(entry.getKey()); dos.writeInt(entry.getValue()); } qp.setData(bos.toByteArray()); writePacket(qp, true); }
protected void ping(QuorumPacket qp) throws IOException { // Send back the ping with our session data ByteArrayOutputStream bos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(bos); HashMap<Long, Integer> touchTable = zk .getTouchSnapshot(); for (Entry<Long, Integer> entry : touchTable.entrySet()) { dos.writeLong(entry.getKey()); dos.writeInt(entry.getValue()); } qp.setData(bos.toByteArray()); writePacket(qp, true); }