本文整理汇总了Java中org.jgroups.util.Util.shutdown方法的典型用法代码示例。如果您正苦于以下问题:Java Util.shutdown方法的具体用法?Java Util.shutdown怎么用?Java Util.shutdown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jgroups.util.Util
的用法示例。
在下文中一共展示了Util.shutdown方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testReconciliationFlushTriggeredByMemberCrashing
import org.jgroups.util.Util; //导入方法依赖的package包/类
/**
* Test scenario:
* <ul>
* <li>3 members: A,B,C
* <li>All members have DISCARD which does <em>not</em> discard any
* messages !
* <li>B (in DISCARD) ignores all messages from C
* <li>C multicasts 5 messages to the cluster, A and C receive them
* <li>C then 'crashes' (Channel.shutdown())
* <li>Before installing view {A,B}, FLUSH makes A sends its 5 messages
* received from C to B
* </ul>
*/
public void testReconciliationFlushTriggeredByMemberCrashing() throws Exception {
FlushTrigger t=new FlushTrigger() {
public void triggerFlush() {
JChannel channel=channels.remove(channels.size() - 1);
try {
Util.shutdown(channel);
}
catch(Exception e) {
e.printStackTrace();
}
};
};
String apps[]={"A", "B", "C"};
reconciliationHelper(apps, t);
}
示例2: destroy
import org.jgroups.util.Util; //导入方法依赖的package包/类
@AfterMethod protected void destroy() {
level("warn", channels);
for(JChannel ch: channels)
try {
Util.shutdown(ch);
}
catch(Exception e) {
e.printStackTrace();
}
}