@Override public void writeObject(BufferOutput buffer, Serializer serializer) { buffer.writeByte(status.id()); if (status == Response.Status.OK) { buffer.writeLong(term).writeBoolean(voted); } else { buffer.writeByte(error.id()); } }
@Override public void writeObject(BufferOutput<?> buffer, Serializer serializer) { buffer.writeByte(status.id()); if (status == Status.OK) { buffer.writeLong(session); buffer.writeLong(timeout); serializer.writeObject(members, buffer); } else { buffer.writeByte(error.id()); } }
@Override public void writeObject(BufferOutput<?> buffer, Serializer serializer) { buffer.writeByte(status.id()); if (status == Status.ERROR) { if (error != null) { buffer.writeBoolean(true).writeByte(error.id()); } else { buffer.writeBoolean(false); } } buffer.writeLong(version); }
@Override public void write(Calendar calendar, BufferOutput buffer, Serializer serializer) { buffer.writeUTF8(calendar.getTimeZone().getID()); buffer.writeLong(calendar.getTimeInMillis()); }
@Override public void writeObject(BufferOutput<?> buffer, Serializer serializer) { super.writeObject(buffer, serializer); buffer.writeLong(ttl); }
@Override public void writeObject(BufferOutput<?> buffer, Serializer serializer) { buffer.writeLong(term).writeBoolean(tombstone); }
@Override public void write(Float object, BufferOutput buffer, Serializer serializer) { buffer.writeFloat(object); }
@Override public void writeObject(BufferOutput<?> buffer, Serializer serializer) { buffer.writeLong(term).writeInt(candidate).writeLong(logIndex).writeLong(logTerm); }