예제 #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());
   }
 }
예제 #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());
   }
 }