public void serialize(TreeRequest request, DataOutput dos, int version) throws IOException {
   dos.writeUTF(request.sessionid);
   CompactEndpointSerializationHelper.serialize(request.endpoint, dos);
   dos.writeUTF(request.cf.left);
   dos.writeUTF(request.cf.right);
   if (version > MessagingService.VERSION_07)
     AbstractBounds.serializer().serialize(request.range, dos, version);
 }
 public void serialize(GossipDigestAck gDigestAckMessage, DataOutput dos, int version)
     throws IOException {
   GossipDigestSerializationHelper.serialize(gDigestAckMessage.gDigestList, dos, version);
   if (version <= MessagingService.VERSION_11) dos.writeBoolean(true); // 0.6 compatibility
   dos.writeInt(gDigestAckMessage.epStateMap.size());
   for (Map.Entry<InetAddress, EndpointState> entry : gDigestAckMessage.epStateMap.entrySet()) {
     InetAddress ep = entry.getKey();
     CompactEndpointSerializationHelper.serialize(ep, dos);
     EndpointState.serializer.serialize(entry.getValue(), dos, version);
   }
 }