use of org.jgroups.protocols.pbcast.STABLE in project JGroups by belaban.
the class SASLTest method createChannel.
private static JChannel createChannel(String channelName, String mech, String username) throws Exception {
SASL sasl = new SASL();
sasl.setMech(mech);
sasl.setClientCallbackHandler(new MyCallbackHandler(username));
sasl.setServerCallbackHandler(new MyCallbackHandler(username));
sasl.setTimeout(5000);
if (System.getProperty("java.vendor").contains("IBM")) {
sasl.sasl_props.put("com.ibm.security.sasl.digest.realm", REALM);
} else {
sasl.sasl_props.put("com.sun.security.sasl.digest.realm", REALM);
}
sasl.setLevel("trace");
GMS gms = new GMS();
gms.setJoinTimeout(3000);
return new JChannel(new Protocol[] { new SHARED_LOOPBACK(), new PING(), new MERGE3(), new NAKACK2(), new UNICAST3(), new STABLE(), sasl, gms }).name(channelName);
}
use of org.jgroups.protocols.pbcast.STABLE in project JGroups by belaban.
the class SASL_SimpleAuthorizingCallbackTest method createChannel.
private JChannel createChannel(String channelName, String mech, String principal) throws Exception {
Properties properties = new Properties();
properties.put("sasl.local.principal", principal);
properties.put("sasl.credentials.properties", credentialsFile.getAbsolutePath());
properties.put("sasl.role", "mycluster");
properties.put("sasl.roles.properties", rolesFile.getAbsolutePath());
properties.put("sasl.realm", REALM);
SASL sasl = new SASL();
sasl.setMech(mech);
sasl.setClientCallbackHandler(new SimpleAuthorizingCallbackHandler(properties));
sasl.setServerCallbackHandler(new SimpleAuthorizingCallbackHandler(properties));
sasl.setTimeout(5000);
if (System.getProperty("java.vendor").contains("IBM")) {
sasl.sasl_props.put("com.ibm.security.sasl.digest.realm", REALM);
} else {
sasl.sasl_props.put("com.sun.security.sasl.digest.realm", REALM);
}
return new JChannel(new Protocol[] { new SHARED_LOOPBACK(), new PING(), new NAKACK2(), new UNICAST3(), new STABLE(), sasl, new GMS() }).name(channelName);
}
use of org.jgroups.protocols.pbcast.STABLE in project JGroups by belaban.
the class SUPERVISOR_Test method createChannel.
protected JChannel createChannel(String name) throws Exception {
JChannel ch = new JChannel(new SHARED_LOOPBACK(), new SHARED_LOOPBACK_PING(), new FD(), new NAKACK2().setValue("use_mcast_xmit", false), new UNICAST3(), new STABLE().setValue("max_bytes", 50000), new GMS().setValue("print_local_addr", false), new SUPERVISOR());
ch.setName(name);
return ch;
}
use of org.jgroups.protocols.pbcast.STABLE in project JGroups by belaban.
the class FCTest method setUp.
protected void setUp(Class<? extends Protocol> flow_control_class) throws Exception {
Protocol flow_control_prot = flow_control_class.newInstance();
flow_control_prot.setValue("min_credits", 1000).setValue("max_credits", 10000).setValue("max_block_time", 1000);
ch = new JChannel(new SHARED_LOOPBACK(), new SHARED_LOOPBACK_PING(), new NAKACK2().setValue("use_mcast_xmit", false), new UNICAST3(), new STABLE().setValue("max_bytes", 50000), new GMS().setValue("print_local_addr", false), flow_control_prot, new FRAG2().fragSize(800));
ch.connect("FCTest");
}
use of org.jgroups.protocols.pbcast.STABLE in project JGroups by belaban.
the class FragTest method createChannel.
protected static JChannel createChannel(String name, Class<? extends Protocol> clazz) throws Exception {
Protocol frag_prot = clazz.newInstance();
frag_prot.setValue("frag_size", FRAG_SIZE);
return new JChannel(new SHARED_LOOPBACK(), new SHARED_LOOPBACK_PING(), new NAKACK2().setValue("use_mcast_xmit", false), new UNICAST3(), new STABLE().setValue("max_bytes", 50000), new GMS().setValue("print_local_addr", false), new UFC(), new MFC(), frag_prot).name(name);
}
Aggregations