本文整理了Java中org.jgroups.util.Util.readAddress()
方法的一些代码示例,展示了Util.readAddress()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.readAddress()
方法的具体详情如下:
包路径:org.jgroups.util.Util
类名称:Util
方法名:readAddress
暂无
代码示例来源:origin: wildfly/wildfly
public void readFrom(DataInput in) throws Exception {
type=in.readByte();
final_dest=Util.readAddress(in);
original_sender=Util.readAddress(in);
}
代码示例来源: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
@Override
public Address read(DataInput input) throws IOException {
// Awkward exception handling due to JGRP-2242
try {
return org.jgroups.util.Util.readAddress(input);
} catch (IOException e) {
throw e;
} catch (Exception e) {
throw new IOException(e);
}
}
代码示例来源: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
public static Address[] readAddresses(DataInput in) throws Exception {
short length=in.readShort();
if(length < 0) return null;
Address[] retval=new Address[length];
for(int i=0; i < length; i++) {
Address addr=Util.readAddress(in);
retval[i]=addr;
}
return retval;
}
代码示例来源:origin: wildfly/wildfly
public void readFrom(DataInput in) throws Exception {
type=in.readShort();
from=Util.readAddress(in);
}
代码示例来源:origin: wildfly/wildfly
public void readFrom(DataInput in) throws Exception {
initiator=Util.readAddress(in);
id=in.readInt();
}
代码示例来源:origin: wildfly/wildfly
public void readFrom(DataInput in) throws Exception {
logical_addr=Util.readAddress(in);
physical_addr=Util.readAddress(in);
logical_name=Bits.readString(in);
}
代码示例来源:origin: wildfly/wildfly
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));
}
}
代码示例来源:origin: wildfly/wildfly
/**
* @param in
* @param factory a factory for creating the returned collection, parameterized by size
* @return Collection of Address objects
* @throws Exception
*/
public static <T extends Collection<Address>> T readAddresses(DataInput in, IntFunction<T> factory) throws Exception {
short length=in.readShort();
if(length < 0) return null;
T retval = factory.apply(length);
Address addr;
for(int i=0; i < length; i++) {
addr=Util.readAddress(in);
retval.add(addr);
}
return retval;
}
代码示例来源:origin: wildfly/wildfly
public void readFrom(DataInput in) throws Exception {
type=Type.values()[in.readByte()];
switch(type) {
case DISSEMINATE:
original_sender=Util.readAddress(in);
break;
case FORWARD:
case VIEW:
case BROADCAST_VIEW:
break;
}
}
代码示例来源:origin: wildfly/wildfly
@Override
public void readFrom(DataInput in) throws Exception {
address = Util.readAddress(in);
id = Bits.readLong(in);
}
代码示例来源:origin: wildfly/wildfly
public void readFrom(DataInput in) throws Exception {
creator=Util.readAddress(in);
id=Bits.readLong(in);
}
代码示例来源:origin: wildfly/wildfly
public void readFrom(DataInput in) throws Exception {
type=in.readByte();
switch(type) {
case MSG:
case XMIT_RSP:
case HIGHEST_SEQNO:
seqno=Bits.readLong(in);
break;
case XMIT_REQ:
sender=Util.readAddress(in);
break;
}
}
代码示例来源:origin: wildfly/wildfly
public void readFrom(DataInput in) throws Exception {
address=Util.readAddress(in);
thread_id=Bits.readLong(in);
}
代码示例来源:origin: wildfly/wildfly
public void readFrom(DataInput in) throws Exception {
remote_view=Util.readView(in);
global_view=Util.readView(in);
int size=in.readInt();
uuids=new HashMap<>();
for(int i=0; i < size; i++) {
Address addr=Util.readAddress(in);
String n=in.readUTF();
uuids.put(addr, n);
}
}
代码示例来源:origin: wildfly/wildfly
public void readFrom(DataInput in) throws Exception {
type=in.readByte();
short flags=in.readShort();
mbr=Util.readAddress(in);
if((flags & MERGE_ID_PRESENT) == MERGE_ID_PRESENT) {
merge_id=new MergeId();
merge_id.readFrom(in);
}
merge_rejected=(flags & MERGE_REJECTED) == MERGE_REJECTED;
useFlushIfPresent=(flags & USE_FLUSH) == USE_FLUSH;
}
代码示例来源:origin: wildfly/wildfly
public void readFrom(DataInput in) throws Exception {
type=Type.values()[in.readShort()];
addr=Util.readAddress(in);
name=Bits.readString(in);
}
代码示例来源:origin: wildfly/wildfly
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);
}
代码示例来源:origin: wildfly/wildfly
@SuppressWarnings("unchecked")
public void readFrom(DataInput instream) throws Exception {
type=Type.values()[instream.readByte()];
view_id=Util.readViewId(instream);
logical_name=Bits.readString(instream);
physical_addr=(PhysicalAddress)Util.readAddress(instream);
}
内容来源于网络,如有侵权,请联系作者删除!