本文整理汇总了Java中org.jgroups.util.Util.readAddress方法的典型用法代码示例。如果您正苦于以下问题:Java Util.readAddress方法的具体用法?Java Util.readAddress怎么用?Java Util.readAddress使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jgroups.util.Util
的用法示例。
在下文中一共展示了Util.readAddress方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: process
import org.jgroups.util.Util; //导入方法依赖的package包/类
protected void process(Socket socket) {
OutputStream output=null;
try {
socket.setSendBufferSize(buffer_size);
if(log.isDebugEnabled())
log.debug(local_addr + ": accepted request for state transfer from " + socket.getInetAddress() + ":" + socket.getPort());
DataInput in=new DataInputStream(socket.getInputStream());
Address stateRequester=Util.readAddress(in);
output=new BufferedOutputStream(socket.getOutputStream(), buffer_size);
getStateFromApplication(stateRequester, output, false);
}
catch(Throwable e) {
if(log.isWarnEnabled())
log.warn(local_addr + ": failed handling request from requester", e);
}
// getStateFromApplication() is run in the same thread; it closes the output stream, and we close the socket
finally {
Util.close(socket);
}
}
示例2: readFrom
import org.jgroups.util.Util; //导入方法依赖的package包/类
public void readFrom(DataInput in) throws Exception {
super.readFrom(in);
short len=in.readShort();
if(len > 0) {
subgroups=new View[len];
for(int i=0; i < len; i++) {
int index=in.readShort();
Address creator=index >= 0 ? get(index) : Util.readAddress(in);
long id=in.readLong();
Address[] mbrs=new Address[in.readShort()];
for(int j=0; j < mbrs.length; j++) {
index=in.readShort();
mbrs[j]=index >= 0? get(index) : Util.readAddress(in);
}
try {
View view=View.create(creator, id, mbrs);
subgroups[i]=view;
}
catch(Throwable t) {
}
}
}
}
示例3: readFrom
import org.jgroups.util.Util; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
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.class);
}
示例4: readFrom
import org.jgroups.util.Util; //导入方法依赖的package包/类
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;
}
}
示例5: readFrom
import org.jgroups.util.Util; //导入方法依赖的package包/类
public void readFrom(DataInput in) throws Exception {
type=in.readByte();
switch(type) {
case MSG:
case XMIT_RSP:
seqno=Bits.readLong(in);
break;
case XMIT_REQ:
range=(Range)Util.readStreamable(Range.class, in);
sender=Util.readAddress(in);
break;
}
}
示例6: readFrom
import org.jgroups.util.Util; //导入方法依赖的package包/类
public void readFrom(DataInput in) throws Exception {
type=in.readByte();
group=Bits.readString(in);
addr=Util.readAddress(in);
logical_name=Bits.readString(in);
mbrs=(List<Address>)Util.readAddresses(in, LinkedList.class);
physical_addr=(PhysicalAddress)Util.readAddress(in);
buffer=Util.readByteBuffer(in);
if(buffer != null) {
offset=0;
length=buffer.length;
}
}
示例7: readFrom
import org.jgroups.util.Util; //导入方法依赖的package包/类
public void readFrom(DataInput in) throws Exception {
type=in.readShort();
from=Util.readAddress(in);
}
示例8: readFrom
import org.jgroups.util.Util; //导入方法依赖的package包/类
public void readFrom(DataInput in) throws Exception {
type=in.readByte();
mbrs=(Collection<Address>)Util.readAddresses(in, ArrayList.class);
from=Util.readAddress(in);
}
示例9: readFrom
import org.jgroups.util.Util; //导入方法依赖的package包/类
@Override
public void readFrom(DataInput in) throws Exception {
address = Util.readAddress(in);
id = Bits.readLong(in);
}
示例10: readFrom
import org.jgroups.util.Util; //导入方法依赖的package包/类
public void readFrom(DataInput in) throws Exception {
creator=Util.readAddress(in);
id=Bits.readLong(in);
}