Ejemplo n.º 1
0
 @Override
 public void writeObject(BufferOutput buffer, Alleycat alleycat) {
   buffer.writeByte(status.id());
   if (status == Status.OK) {
     buffer.writeLong(term).writeInt(leader).writeLong(session);
     alleycat.writeObject(members, buffer);
   } else {
     buffer.writeByte(error.id());
   }
 }
Ejemplo n.º 2
0
 @Override
 public void writeObject(BufferOutput buffer, Alleycat alleycat) {
   buffer.writeByte(status.id());
   if (status == Status.OK) {
     buffer.writeLong(version);
     alleycat.writeObject(result, buffer);
   } else {
     buffer.writeByte(error.id());
   }
 }