Ejemplo n.º 1
0
 @Override
 public void readObject(BufferInput buffer, Alleycat alleycat) {
   status = Status.forId(buffer.readByte());
   if (status == Status.OK) {
     error = null;
     version = buffer.readLong();
     result = alleycat.readObject(buffer);
   } else {
     error = RaftError.forId(buffer.readByte());
   }
 }
Ejemplo n.º 2
0
 @Override
 public void readObject(BufferInput buffer, Alleycat alleycat) {
   status = Status.forId(buffer.readByte());
   if (status == Status.OK) {
     error = null;
     term = buffer.readLong();
     leader = buffer.readInt();
     session = buffer.readLong();
     members = alleycat.readObject(buffer);
   } else {
     error = RaftError.forId(buffer.readByte());
   }
 }