use of org.opendaylight.netconf.topology.singleton.impl.utils.ClusteringRpcException in project netconf by opendaylight.
the class ActorProxyNetconfServiceFacade method unlock.
@Override
public ListenableFuture<DOMRpcResult> unlock() {
LOG.debug("{}: Unlock via actor {}", id, masterActor);
final SettableFuture<DOMRpcResult> unlockResult = SettableFuture.create();
final Future<Object> future = Patterns.ask(masterActor, new UnlockRequest(), askTimeout);
future.onComplete(new OnComplete<>() {
@Override
public void onComplete(final Throwable failure, final Object response) {
if (failure != null) {
unlockResult.setException(failure);
} else if (response instanceof InvokeRpcMessageReply) {
unlockResult.set(mapInvokeRpcMessageReplyToDOMRpcResult((InvokeRpcMessageReply) response));
} else {
unlockResult.setException(new ClusteringRpcException("Unlock operation returned unexpected type"));
LOG.error("{}: Unlock via actor {} returned unexpected type", id, masterActor);
}
}
}, executionContext);
return unlockResult;
}
Aggregations