Search in sources :

Example 1 with PullPushAdapter

use of org.jgroups.blocks.PullPushAdapter in project cayenne by apache.

the class JavaGroupsBridge method startupExternal.

@Override
protected void startupExternal() throws Exception {
    // set of properties, trying to configure multicast address and port
    if (configURL != null) {
        channel = new JChannel(configURL);
    } else {
        String configString = buildConfigString();
        channel = new JChannel(configString);
    }
    // Important - discard messages from self
    channel.setOpt(Channel.LOCAL, Boolean.FALSE);
    channel.connect(externalSubject);
    if (receivesExternalEvents()) {
        adapter = new PullPushAdapter(channel, this);
    }
}
Also used : JChannel(org.jgroups.JChannel) PullPushAdapter(org.jgroups.blocks.PullPushAdapter)

Aggregations

JChannel (org.jgroups.JChannel)1 PullPushAdapter (org.jgroups.blocks.PullPushAdapter)1