use of org.opendaylight.controller.clustering.it.provider.impl.FlappingSingletonService in project controller by opendaylight.
the class MdsalLowLevelTestProvider method registerFlappingSingleton.
@Override
public Future<RpcResult<Void>> registerFlappingSingleton() {
LOG.debug("Received register-flapping-singleton.");
if (flappingSingletonService != null) {
final RpcError error = RpcResultBuilder.newError(ErrorType.RPC, "Registration present.", "flapping-singleton already registered");
return Futures.immediateFuture(RpcResultBuilder.<Void>failed().withRpcError(error).build());
}
flappingSingletonService = new FlappingSingletonService(singletonService);
return Futures.immediateFuture(RpcResultBuilder.<Void>success().build());
}
Aggregations