public Message getMessage() {
   DataOutputBuffer dob = new DataOutputBuffer();
   try {
     serializer.serialize(this, dob);
   } catch (IOException e) {
     throw new IOError(e);
   }
   return new Message(
       FBUtilities.getLocalAddress(),
       StorageService.Verb.INDEX_SCAN,
       Arrays.copyOf(dob.getData(), dob.getLength()));
 }
Example #2
0
 public static IndexScanCommand read(Message message) throws IOException {
   byte[] bytes = message.getMessageBody();
   FastByteArrayInputStream bis = new FastByteArrayInputStream(bytes);
   return serializer.deserialize(new DataInputStream(bis), message.getVersion());
 }