예제 #1
0
 @Override
 public void readObject(BufferInput<?> buffer, Serializer serializer) {
   status = Status.forId(buffer.readByte());
   if (status == Status.OK) {
     error = null;
   } else if (buffer.readBoolean()) {
     error = RaftError.forId(buffer.readByte());
   }
   version = buffer.readLong();
 }
예제 #2
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());
   }
 }
예제 #3
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());
   }
 }
예제 #4
0
 @Override
 public void readObject(BufferInput<?> buffer, Serializer serializer) {
   status = Status.forId(buffer.readByte());
   if (status == Status.OK) {
     error = null;
     session = buffer.readLong();
     timeout = buffer.readLong();
     members = serializer.readObject(buffer);
   } else {
     error = RaftError.forId(buffer.readByte());
     session = 0;
     members = null;
   }
 }