use of com.sleepycat.je.rep.util.ReplicationGroupAdmin in project qpid-broker-j by apache.
the class ReplicatedEnvironmentFacade method createReplicationGroupAdmin.
private ReplicationGroupAdmin createReplicationGroupAdmin() {
final Set<InetSocketAddress> helpers = new HashSet<InetSocketAddress>();
final ReplicationConfig repConfig = getEnvironment().getRepConfig();
helpers.addAll(repConfig.getHelperSockets());
helpers.add(HostPortPair.getSocket(HostPortPair.getString(repConfig.getNodeHostname(), repConfig.getNodePort())));
return new ReplicationGroupAdmin(_configuration.getGroupName(), helpers);
}
use of com.sleepycat.je.rep.util.ReplicationGroupAdmin in project qpid-broker-j by apache.
the class BDBHAVirtualHostNodeImpl method onDelete.
@Override
protected ListenableFuture<Void> onDelete() {
final Set<InetSocketAddress> helpers = getRemoteNodeAddresses();
return doAfterAlways(closeVirtualHostIfExists(), () -> {
closeEnvironment();
DurableConfigurationStore configurationStore = getConfigurationStore();
if (configurationStore != null) {
configurationStore.closeConfigurationStore();
configurationStore.onDelete(BDBHAVirtualHostNodeImpl.this);
getEventLogger().message(getVirtualHostNodeLogSubject(), HighAvailabilityMessages.DELETE(getName(), String.valueOf(Outcome.SUCCESS)));
}
if (!helpers.isEmpty()) {
try {
new ReplicationGroupAdmin(_groupName, helpers).removeMember(getName());
} catch (DatabaseException e) {
LOGGER.warn(String.format("The deletion of node %s on remote nodes failed due to: %s. To finish deletion a " + "removal of the node from any of remote nodes (%s) is required.", this, e.getMessage(), helpers));
}
}
onCloseOrDelete();
});
}
Aggregations