本文整理汇总了Java中org.jgroups.Message.Flag方法的典型用法代码示例。如果您正苦于以下问题:Java Message.Flag方法的具体用法?Java Message.Flag怎么用?Java Message.Flag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jgroups.Message
的用法示例。
在下文中一共展示了Message.Flag方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: outerMethod
import org.jgroups.Message; //导入方法依赖的package包/类
public String outerMethod() throws Exception {
log("**** outerMethod() received, calling innerMethod() on all members");
MethodCall call = new MethodCall("innerMethod", new Object[0], new Class[0]);
// RspList rspList = disp.callRemoteMethods(null, call, GroupResponseMode.GET_ALL, 5000);
RequestOptions opts=new RequestOptions(ResponseMode.GET_ALL, 0, false, null, (Message.Flag[])null);
opts.setFlags(Message.Flag.OOB);
RspList<String> rspList = disp.callRemoteMethods(null, call, opts);
List<String> results = rspList.getResults();
log("results of calling innerMethod():\n" + rspList);
StringBuilder sb=new StringBuilder("outerMethod[");
boolean first=true;
for(String s: results) {
if(first)
first=false;
else
sb.append(";");
sb.append(s);
}
sb.append("]");
return sb.toString();
}
示例2: setFlags
import org.jgroups.Message; //导入方法依赖的package包/类
public RequestOptions setFlags(Message.Flag ... flags) {
if(flags != null)
for(Message.Flag flag: flags)
if(flag != null)
this.flags |= flag.value();
return this;
}
示例3: clearFlags
import org.jgroups.Message; //导入方法依赖的package包/类
public RequestOptions clearFlags(Message.Flag ... flags) {
if(flags != null)
for(Message.Flag flag: flags)
if(flag != null)
this.flags &= ~flag.value();
return this;
}
示例4: RequestOptions
import org.jgroups.Message; //导入方法依赖的package包/类
public RequestOptions(ResponseMode mode, long timeout, boolean use_anycasting, RspFilter rsp_filter, Message.Flag ... flags) {
this(mode, timeout, use_anycasting, rsp_filter,(short)0);
setFlags(flags);
}
示例5: isFlagSet
import org.jgroups.Message; //导入方法依赖的package包/类
public boolean isFlagSet(Message.Flag flag) {
return flag != null && ((flags & flag.value()) == flag.value());
}