本文整理了Java中org.jgroups.protocols.UDP.<init>()
方法的一些代码示例,展示了UDP.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UDP.<init>()
方法的具体详情如下:
包路径:org.jgroups.protocols.UDP
类名称:UDP
方法名:<init>
[英]Creates the UDP protocol, and initializes the state variables, does however not start any sockets or threads.
[中]创建UDP协议并初始化状态变量,但不会启动任何套接字或线程。
代码示例来源:origin: wildfly/wildfly
public static void main(String[] args) throws Exception {
Protocol[] prot_stack={
new UDP().setValue("bind_addr", InetAddress.getByName("127.0.0.1")),
new PING(),
new MERGE3(),
代码示例来源:origin: org.infinispan/infinispan-core
public void channelLookupTest() {
when(mockChannel.getAddress()).thenReturn(a);
when(mockChannel.down(isA(Event.class))).thenReturn(a);
when(mockChannel.getView()).thenReturn(v);
when(mockChannel.getProtocolStack()).thenReturn(ps);
when(ps.getTransport()).thenReturn(new UDP());
EmbeddedCacheManager cm = null;
try {
GlobalConfigurationBuilder gc = GlobalConfigurationBuilder.defaultClusteredBuilder();
gc.transport().defaultTransport().addProperty("channelLookup", DummyLookup.class.getName());
cm = TestCacheManagerFactory.createClusteredCacheManager(gc, new ConfigurationBuilder());
cm.start();
cm.getCache();
GlobalComponentRegistry gcr = TestingUtil.extractGlobalComponentRegistry(cm);
Transport t = gcr.getComponent(Transport.class);
assertNotNull(t);
assertTrue(t instanceof JGroupsTransport);
assertNotSame(JChannel.class, ((JGroupsTransport) t).getChannel().getClass());
} finally {
TestingUtil.killCacheManagers(cm);
}
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
public static void main(String[] args) throws Exception {
Protocol[] prot_stack={
new UDP().setValue("bind_addr", InetAddress.getByName("127.0.0.1")),
new PING(),
new MERGE3(),
内容来源于网络,如有侵权,请联系作者删除!