public void writeTo(DataOutput out) throws Exception { out.writeByte(type); Util.writeStreamable(digest, out); Util.writeStreamable(bind_addr, out); }
public void writeTo(DataOutput out) throws Exception { out.writeByte(type); Util.writeStreamable(my_digest, out); }
@Override public void writeTo(DataOutput out) throws Exception { Util.writeStreamable(new ByteBufferStreamable(bytes1), out); Util.writeStreamable(new ByteBufferStreamable(bytes2), out); }
@Override public void writeTo(DataOutput out) throws Exception { Util.writeStreamable(new ByteBufferStreamable(buffer), out); }
public void writeTo(DataOutput out) throws Exception { out.writeByte(type.ordinal()); Bits.writeString(lock_name,out); out.writeInt(lock_id); Util.writeStreamable(owner, out); out.writeLong(timeout); out.writeBoolean(is_trylock); Util.writeStreamable(info_rsp, out); Util.writeAddress(sender, out); }
public void writeTo(DataOutput out) throws Exception { out.writeByte(type); Util.writeAddress(mbr, out); Util.writeStreamable(sock_addr, out); int size=mbrs != null? mbrs.size() : 0; out.writeInt(size); if(size > 0) for(Address address: mbrs) Util.writeAddress(address, out); }
public void writeTo(DataOutput out) throws Exception { Bits.writeLong(num_gets, out); Bits.writeLong(num_puts, out); Bits.writeLong(time, out); Util.writeStreamable(avg_gets, out); Util.writeStreamable(avg_puts, out); }
public static Buffer streamableToBuffer(Streamable obj) { int expected_size=obj instanceof SizeStreamable? ((SizeStreamable)obj).serializedSize() +1 : 512; final ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(expected_size); try { Util.writeStreamable(obj,out); return out.getBuffer(); } catch(Exception ex) { return null; } }
protected static Buffer marshal(final Collection<? extends Address> participants, final Digest digest) { final ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(512); try { Util.writeAddresses(participants, out); Util.writeStreamable(digest,out); return out.getBuffer(); } catch(Exception ex) { return null; } }
public static Buffer marshal(LazyRemovalCache<Address,IpAddress> addrs) { final ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(512); try { int size=addrs != null? addrs.size() : 0; out.writeInt(size); if(size > 0) { for(Map.Entry<Address,LazyRemovalCache.Entry<IpAddress>> entry: addrs.entrySet()) { Address key=entry.getKey(); IpAddress val=entry.getValue().getVal(); Util.writeAddress(key, out); Util.writeStreamable(val, out); } } return out.getBuffer(); } catch(Exception ex) { return null; } }
public void writeTo(DataOutput out) throws Exception { out.writeByte(type); Util.writeStreamable(digest, out); Util.writeStreamable(bind_addr, out); }
public void writeTo(DataOutput out) throws Exception { out.writeByte(type); Util.writeStreamable(my_digest, out); }
public void writeTo(DataOutputStream out) throws IOException { out.writeByte(type); boolean isMergeView=view != null && view instanceof MergeView; out.writeBoolean(isMergeView); Util.writeStreamable(view, out); Util.writeAddress(mbr, out); Util.writeStreamable(join_rsp, out); Util.writeStreamable(my_digest, out); Util.writeStreamable(merge_id, out); // kludge: we know merge_id is a ViewId out.writeBoolean(merge_rejected); }
public void writeTo(DataOutputStream out) throws IOException { Util.writeStreamable(view, out); Util.writeStreamable(digest, out); Util.writeString(fail_reason, out); }
public void writeTo(DataOutputStream out) throws IOException { out.writeInt(type); // 0 == null, 1 == View, 2 == MergeView byte b=(byte)(view == null? 0 : (view instanceof MergeView? 2 : 1)); out.writeByte(b); Util.writeStreamable(view, out); }
public void writeTo(DataOutputStream out) throws IOException { out.writeByte(type); out.writeLong(id); Util.writeAddress(sender, out); Util.writeStreamable(my_digest, out); Util.writeStreamable(bind_addr, out); Util.writeString(state_id, out); }
public void writeTo(DataOutputStream out) throws IOException { out.writeByte(type); if(type != XMIT_RSP) out.writeLong(seqno); Util.writeStreamable(range, out); Util.writeAddress(sender, out); }
@Override public void writeTo(DataOutput out) throws Exception { Util.writeStreamable(new ByteBufferStreamable(bytes1), out); Util.writeStreamable(new ByteBufferStreamable(bytes2), out); }
public void writeTo(DataOutput out) throws Exception { out.writeByte(type.ordinal()); Bits.writeString(lock_name,out); out.writeInt(lock_id); Util.writeStreamable(owner, out); out.writeLong(timeout); out.writeBoolean(is_trylock); Util.writeStreamable(info_rsp, out); Util.writeAddress(sender, out); }
public void writeTo(DataOutput out) throws Exception { out.writeByte(type); Util.writeAddress(mbr, out); Util.writeStreamable(sock_addr, out); int size=mbrs != null? mbrs.size() : 0; out.writeInt(size); if(size > 0) for(Address address: mbrs) Util.writeAddress(address, out); }