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

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

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

Util.writeAddresses介绍

[英]Writes a list of Addresses. Can contain 65K addresses at most
[中]写一个地址列表。最多可包含65K个地址

代码示例

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

@Override
public void writeTo(DataOutput out) throws Exception {
  Util.writeAddresses(destinations, out);
}

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

public void writeTo(DataOutput out) throws Exception {
  out.writeByte(type);
  Util.writeAddresses(mbrs, out);
  Util.writeAddress(from, out);
}

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

public void writeTo(DataOutput out) throws Exception {
  super.writeTo(out);
  Util.writeAddresses(exclusion_list, out);
}

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

public void writeTo(DataOutput out) throws Exception {
  view_id.writeTo(out);
  ref_view_id.writeTo(out);
  Util.writeAddresses(left_members, out);
  Util.writeAddresses(new_members, out);
}

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

public void writeTo(DataOutput out) throws Exception {
  view_id.writeTo(out);
  Util.writeAddresses(members,out);
}

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

public void writeTo(DataOutput out, boolean write_addrs) throws Exception {
  if(write_addrs)
    Util.writeAddresses(members, out);
  else
    out.writeShort(members.length);
  for(int i=0; i < capacity(); i++)
    Bits.writeLongSequence(seqnos[i * 2], seqnos[i * 2 +1], out);
}

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

public void writeTo(DataOutput outstream) throws Exception {
  Util.writeAddress(sender, outstream);
  outstream.writeByte(flags);
  Bits.writeString(logical_name,outstream);
  Util.writeAddress(physical_addr,outstream);
  Util.writeAddresses(mbrs, outstream);
}

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

protected static Buffer marshal(Collection<? extends Address> mbrs) {
  try {
    final ByteArrayDataOutputStream out=new ByteArrayDataOutputStream((int)Util.size(mbrs));
    Util.writeAddresses(mbrs, out);
    return out.getBuffer();
  }
  catch(Exception ex) {
    return null;
  }
}

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

public static byte[] collectionToByteBuffer(Collection<Address> c) throws Exception {
  final ByteArrayDataOutputStream out=new ByteArrayDataOutputStream((int)Util.size(c));
  Util.writeAddresses(c,out);
  return Arrays.copyOf(out.buffer(), out.position());
}

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

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

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

public static byte[] collectionToByteBuffer(Collection c) throws Exception {
  byte[] result=null;
  synchronized(out_stream) {
    out_stream.reset();
    DataOutputStream out=new DataOutputStream(out_stream);
    Util.writeAddresses(c, out);
    result=out_stream.toByteArray();
    out.close();
  }
  return result;
}

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

public void writeTo(DataOutputStream out) throws IOException {
  out.writeByte(type);
  Util.writeAddresses(mbrs, out);
  Util.writeAddress(from, out);
}

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

public void writeTo(DataOutput out) throws Exception {
  out.writeByte(type);
  Util.writeAddresses(mbrs, out);
  Util.writeAddress(from, out);
}

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

public void writeTo(DataOutput out) throws Exception {
  view_id.writeTo(out);
  ref_view_id.writeTo(out);
  Util.writeAddresses(left_members, out);
  Util.writeAddresses(new_members, out);
}

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

public void writeTo(DataOutputStream out) throws IOException {
  // vid
  if(vid != null) {
    out.writeBoolean(true);
    vid.writeTo(out);
  }
  else
    out.writeBoolean(false);
  // members:
  Util.writeAddresses(members, out);
}

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

public void writeTo(DataOutput out, boolean write_addrs) throws Exception {
  if(write_addrs)
    Util.writeAddresses(members, out);
  else
    out.writeShort(members.length);
  for(int i=0; i < capacity(); i++)
    Bits.writeLongSequence(seqnos[i * 2], seqnos[i * 2 +1], out);
}

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

public void writeTo(DataOutputStream out) throws IOException {
  out.writeByte(type);
  Util.writeString(group, out);
  Util.writeAddress(addr, out);
  Util.writeAddresses(mbrs, out);
}

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

public void writeTo(DataOutput outstream) throws Exception {
  Util.writeAddress(sender, outstream);
  outstream.writeByte(flags);
  Bits.writeString(logical_name,outstream);
  Util.writeAddress(physical_addr,outstream);
  Util.writeAddresses(mbrs, outstream);
}

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

protected static Buffer marshal(Collection<? extends Address> mbrs) {
  try {
    final ByteArrayDataOutputStream out=new ByteArrayDataOutputStream((int)Util.size(mbrs));
    Util.writeAddresses(mbrs, out);
    return out.getBuffer();
  }
  catch(Exception ex) {
    return null;
  }
}

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

public static byte[] collectionToByteBuffer(Collection<Address> c) throws Exception {
  final ByteArrayDataOutputStream out=new ByteArrayDataOutputStream((int)Util.size(c));
  Util.writeAddresses(c,out);
  return Arrays.copyOf(out.buffer(), out.position());
}

相关文章

Util类方法