@Override public void readFrom(DataInput in) throws Exception { bytes1 = Util.readStreamable(ByteBufferStreamable::new, in).buffer; bytes2 = Util.readStreamable(ByteBufferStreamable::new, in).buffer; } }
@Override public void readFrom(DataInput in) throws Exception { buffer = Util.readStreamable(ByteBufferStreamable::new, in).buffer; } }
public void readFrom(DataInput in) throws Exception { type=in.readByte(); digest=Util.readStreamable(Digest::new, in); bind_addr=Util.readStreamable(IpAddress::new, in); }
public void readFrom(DataInput in) throws Exception { type=in.readByte(); my_digest=Util.readStreamable(Digest::new, in); }
@Deprecated public static <T extends Streamable> T streamableFromBuffer(Class<T> clazz,byte[] buffer,int offset,int length) throws Exception { DataInput in=new ByteArrayDataInputStream(buffer,offset,length); return Util.readStreamable(clazz, in); }
public static <T extends Streamable> T streamableFromBuffer(Supplier<T> factory, byte[] buffer, int offset, int length) throws Exception { DataInput in=new ByteArrayDataInputStream(buffer,offset,length); return Util.readStreamable(factory, in); }
public void readFrom(DataInput in) throws Exception { type=Type.values()[in.readByte()]; lock_name=Bits.readString(in); lock_id=in.readInt(); owner=Util.readStreamable(Owner::new, in); timeout=in.readLong(); is_trylock=in.readBoolean(); info_rsp=Util.readStreamable(LockInfoResponse::new, in); sender=Util.readAddress(in); }
public void readFrom(DataInput in) throws Exception { type=in.readByte(); mbr=Util.readAddress(in); sock_addr=Util.readStreamable(IpAddress::new, in); int size=in.readInt(); if(size > 0) { mbrs=new HashSet<>(); for(int i=0; i < size; i++) mbrs.add(Util.readAddress(in)); } }
public void readFrom(DataInput in) throws Exception { num_gets=Bits.readLong(in); num_puts=Bits.readLong(in); time=Bits.readLong(in); avg_gets=Util.readStreamable(AverageMinMax::new, in); avg_puts=Util.readStreamable(AverageMinMax::new, in); }
protected Map<Address,IpAddress> unmarshal(byte[] buffer, int offset, int length) { if(buffer == null) return null; DataInput in=new ByteArrayDataInputStream(buffer, offset, length); HashMap<Address,IpAddress> addrs=null; try { int size=in.readInt(); if(size > 0) { addrs=new HashMap<>(size); for(int i=0; i < size; i++) { Address key=Util.readAddress(in); IpAddress val=Util.readStreamable(IpAddress::new, in); addrs.put(key, val); } } return addrs; } catch(Exception ex) { log.error("%s: failed reading addresses from message: %s", local_addr, ex); return null; } }
protected Tuple<Collection<? extends Address>,Digest> readParticipantsAndDigest(byte[] buffer, int offset, int length) { if(buffer == null) return null; try { DataInput in=new ByteArrayDataInputStream(buffer, offset, length); Collection<Address> participants=Util.readAddresses(in, ArrayList::new); Digest digest=Util.readStreamable(Digest::new, in); return new Tuple<>(participants, digest); } catch(Exception ex) { log.error("%s: failed reading particpants and digest from message: %s", localAddress, ex); return null; } }
@Override public void readFrom(DataInput in) throws Exception { buffer = Util.readStreamable(ByteBufferStreamable::new, in).buffer; } }
@Override public void readFrom(DataInput in) throws Exception { bytes1 = Util.readStreamable(ByteBufferStreamable::new, in).buffer; bytes2 = Util.readStreamable(ByteBufferStreamable::new, in).buffer; } }
public void readFrom(DataInput in) throws Exception { type=in.readByte(); digest=Util.readStreamable(Digest::new, in); bind_addr=Util.readStreamable(IpAddress::new, in); }
public void readFrom(DataInputStream instream) throws IOException, IllegalAccessException, InstantiationException { type=instream.readByte(); arg=(PingRsp)Util.readStreamable(PingRsp.class, instream); } }
public void readFrom(DataInputStream in) throws IOException, IllegalAccessException, InstantiationException { view=(View)Util.readStreamable(View.class, in); digest=(Digest)Util.readStreamable(Digest.class, in); fail_reason=Util.readString(in); }
public static <T extends Streamable> T streamableFromBuffer(Supplier<T> factory, byte[] buffer, int offset, int length) throws Exception { DataInput in=new ByteArrayDataInputStream(buffer,offset,length); return Util.readStreamable(factory, in); }
public void readFrom(DataInputStream in) throws IOException, IllegalAccessException, InstantiationException { type=in.readByte(); if(type != XMIT_RSP) seqno=in.readLong(); range=(Range)Util.readStreamable(Range.class, in); sender=Util.readAddress(in); }
public void readFrom(DataInputStream in) throws IOException, IllegalAccessException, InstantiationException { type = in.readByte(); id = in.readLong(); sender = Util.readAddress(in); my_digest = (Digest) Util.readStreamable(Digest.class, in); bind_addr = (IpAddress) Util.readStreamable(IpAddress.class, in); state_id = Util.readString(in); }
public void readFrom(DataInput in) throws Exception { type=Type.values()[in.readByte()]; lock_name=Bits.readString(in); lock_id=in.readInt(); owner=Util.readStreamable(Owner::new, in); timeout=in.readLong(); is_trylock=in.readBoolean(); info_rsp=Util.readStreamable(LockInfoResponse::new, in); sender=Util.readAddress(in); }