Search in sources :

Example 1 with ReplicationGroup

use of com.sleepycat.je.rep.ReplicationGroup in project qpid-broker-j by apache.

the class ReplicatedEnvironmentFacade method populateExistingRemoteReplicationNodes.

private void populateExistingRemoteReplicationNodes() {
    try {
        ReplicationGroup group = getEnvironment().getGroup();
        Set<ReplicationNode> nodes = new HashSet<>(group.getElectableNodes());
        String localNodeName = getNodeName();
        for (ReplicationNode replicationNode : nodes) {
            String discoveredNodeName = replicationNode.getName();
            if (!discoveredNodeName.equals(localNodeName)) {
                _remoteReplicationNodes.put(replicationNode.getName(), replicationNode);
            }
        }
    } catch (RuntimeException e) {
        // should never happen
        handleDatabaseException("Exception on discovery of existing nodes", e);
    }
}
Also used : ConnectionScopedRuntimeException(org.apache.qpid.server.util.ConnectionScopedRuntimeException) ServerScopedRuntimeException(org.apache.qpid.server.util.ServerScopedRuntimeException) ReplicationGroup(com.sleepycat.je.rep.ReplicationGroup) ReplicationNode(com.sleepycat.je.rep.ReplicationNode) HashSet(java.util.HashSet)

Aggregations

ReplicationGroup (com.sleepycat.je.rep.ReplicationGroup)1 ReplicationNode (com.sleepycat.je.rep.ReplicationNode)1 HashSet (java.util.HashSet)1 ConnectionScopedRuntimeException (org.apache.qpid.server.util.ConnectionScopedRuntimeException)1 ServerScopedRuntimeException (org.apache.qpid.server.util.ServerScopedRuntimeException)1