org.jgroups.util.Util.readAddresses()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(184)

本文整理了Java中org.jgroups.util.Util.readAddresses()方法的一些代码示例,展示了Util.readAddresses()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.readAddresses()方法的具体详情如下:
包路径:org.jgroups.util.Util
类名称:Util
方法名:readAddresses

Util.readAddresses介绍

暂无

代码示例

代码示例来源:origin: wildfly/wildfly

@Override
public void readFrom(DataInput in) throws Exception {
  destinations=Util.readAddresses(in, ArrayList::new);
}

代码示例来源:origin: wildfly/wildfly

public void readFrom(DataInput in) throws Exception {
  type=in.readByte();
  mbrs=Util.readAddresses(in, ArrayList::new);
  from=Util.readAddress(in);
}

代码示例来源:origin: wildfly/wildfly

public void readFrom(DataInput in) throws Exception {
  super.readFrom(in);
  exclusion_list=Util.readAddresses(in);
}

代码示例来源:origin: wildfly/wildfly

public void readFrom(DataInput in, boolean read_addrs) throws Exception {
  if(read_addrs) {
    members=Util.readAddresses(in);
    seqnos=new long[capacity() * 2];
  }
  else
    seqnos=new long[in.readShort() *2];
  for(int i=0; i < seqnos.length/2; i++)
    Bits.readLongSequence(in, seqnos, i*2);
}

代码示例来源:origin: wildfly/wildfly

public void readFrom(DataInput in) throws Exception {
  view_id=new ViewId();
  view_id.readFrom(in);
  ref_view_id=new ViewId();
  ref_view_id.readFrom(in);
  left_members=Util.readAddresses(in);
  new_members=Util.readAddresses(in);
}

代码示例来源:origin: wildfly/wildfly

protected Collection<? extends Address> readMembers(byte[] buffer, int offset, int length) {
  if(buffer == null) return null;
  try {
    DataInput in=new ByteArrayDataInputStream(buffer, offset, length);
    return Util.readAddresses(in, ArrayList::new);
  }
  catch(Exception ex) {
    log.error("%s: failed reading members from message: %s", local_addr, ex);
    return null;
  }
}

代码示例来源:origin: wildfly/wildfly

@SuppressWarnings("unchecked") 
public void readFrom(DataInput in) throws Exception {
  view_id=new ViewId();
  view_id.readFrom(in);
  members=Util.readAddresses(in);
}

代码示例来源:origin: wildfly/wildfly

public void readFrom(DataInput instream) throws Exception {
  sender=Util.readAddress(instream);
  flags=instream.readByte();
  logical_name=Bits.readString(instream);
  physical_addr=(PhysicalAddress)Util.readAddress(instream);
  mbrs=Util.readAddresses(instream, ArrayList::new);
}

代码示例来源:origin: wildfly/wildfly

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;
  }
}

代码示例来源:origin: org.jgroups/com.springsource.org.jgroups

public void readFrom(DataInputStream in) throws IOException, IllegalAccessException, InstantiationException {
  type=in.readByte();
  mbrs=(Vector<Address>)Util.readAddresses(in, Vector.class);
  from=Util.readAddress(in);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public void readFrom(DataInput in) throws Exception {
  type=in.readByte();
  mbrs=Util.readAddresses(in, ArrayList::new);
  from=Util.readAddress(in);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public void readFrom(DataInput in) throws Exception {
  super.readFrom(in);
  exclusion_list=Util.readAddresses(in);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public void readFrom(DataInput in, boolean read_addrs) throws Exception {
  if(read_addrs) {
    members=Util.readAddresses(in);
    seqnos=new long[capacity() * 2];
  }
  else
    seqnos=new long[in.readShort() *2];
  for(int i=0; i < seqnos.length/2; i++)
    Bits.readLongSequence(in, seqnos, i*2);
}

代码示例来源:origin: org.jgroups/com.springsource.org.jgroups

public void readFrom(DataInputStream in) throws IOException, IllegalAccessException, InstantiationException {
  boolean b;
  // vid:
  b=in.readBoolean();
  if(b) {
    vid=new ViewId();
    vid.readFrom(in);
  }
  // members:
  members=(Vector<Address>)Util.readAddresses(in, Vector.class);
}

代码示例来源:origin: org.jgroups/com.springsource.org.jgroups

public void readFrom(DataInputStream in) throws IOException, IllegalAccessException, InstantiationException {
  type=in.readByte();
  group=Util.readString(in);
  addr=Util.readAddress(in);
  mbrs=(List)Util.readAddresses(in, LinkedList.class);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

protected Collection<? extends Address> readMembers(byte[] buffer, int offset, int length) {
  if(buffer == null) return null;
  try {
    DataInput in=new ByteArrayDataInputStream(buffer, offset, length);
    return Util.readAddresses(in, ArrayList::new);
  }
  catch(Exception ex) {
    log.error("%s: failed reading members from message: %s", local_addr, ex);
    return null;
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public void readFrom(DataInput in) throws Exception {
  view_id=new ViewId();
  view_id.readFrom(in);
  ref_view_id=new ViewId();
  ref_view_id.readFrom(in);
  left_members=Util.readAddresses(in);
  new_members=Util.readAddresses(in);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

@SuppressWarnings("unchecked") 
public void readFrom(DataInput in) throws Exception {
  view_id=new ViewId();
  view_id.readFrom(in);
  members=Util.readAddresses(in);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public void readFrom(DataInput instream) throws Exception {
  sender=Util.readAddress(instream);
  flags=instream.readByte();
  logical_name=Bits.readString(instream);
  physical_addr=(PhysicalAddress)Util.readAddress(instream);
  mbrs=Util.readAddresses(instream, ArrayList::new);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

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;
  }
}

相关文章

Util类方法