import org.opendaylight.controller.cluster.datastore.persisted.DatastoreSnapshotList;
import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
import org.opendaylight.controller.cluster.raft.client.messages.GetSnapshot;
import org.opendaylight.controller.cluster.datastore.persisted.DatastoreSnapshotList;
import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
import org.opendaylight.controller.cluster.raft.client.messages.GetSnapshot;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.ActivateEosDatacenterInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.ActivateEosDatacenterOutput;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.ActivateEosDatacenterInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.cluster.admin.rev151013.ActivateEosDatacenterOutput;
private static final Logger LOG = LoggerFactory.getLogger(ClusterAdminRpcService.class);
private static final @NonNull RpcResult<LocateShardOutput> LOCAL_SHARD_RESULT =
RpcResultBuilder.success(new LocateShardOutputBuilder()
private static final Logger LOG = LoggerFactory.getLogger(ClusterAdminRpcService.class);
private static final @NonNull RpcResult<LocateShardOutput> LOCAL_SHARD_RESULT =
RpcResultBuilder.success(new LocateShardOutputBuilder()
private final DistributedDataStoreInterface operDataStore;
private final BindingNormalizedNodeSerializer serializer;
private final Timeout makeLeaderLocalTimeout;
private final DistributedDataStoreInterface operDataStore;
private final BindingNormalizedNodeSerializer serializer;
private final Timeout makeLeaderLocalTimeout;
public ClusterAdminRpcService(final DistributedDataStoreInterface configDataStore,
final DistributedDataStoreInterface operDataStore,
final BindingNormalizedNodeSerializer serializer,
public ClusterAdminRpcService(final DistributedDataStoreInterface configDataStore,
final DistributedDataStoreInterface operDataStore,
final BindingNormalizedNodeSerializer serializer,
this.configDataStore = configDataStore;
this.operDataStore = operDataStore;
this.serializer = serializer;
this.configDataStore = configDataStore;
this.operDataStore = operDataStore;
this.serializer = serializer;
new Timeout(configDataStore.getActorUtils().getDatastoreContext()
.getShardLeaderElectionTimeout().duration().$times(2));
new Timeout(configDataStore.getActorUtils().getDatastoreContext()
.getShardLeaderElectionTimeout().duration().$times(2));
final ActivateEosDatacenterInput input) {
LOG.debug("Activating EOS Datacenter");
final SettableFuture<RpcResult<ActivateEosDatacenterOutput>> future = SettableFuture.create();
final ActivateEosDatacenterInput input) {
LOG.debug("Activating EOS Datacenter");
final SettableFuture<RpcResult<ActivateEosDatacenterOutput>> future = SettableFuture.create();
LOG.debug("Successfully activated datacenter.");
future.set(RpcResultBuilder.<ActivateEosDatacenterOutput>success().build());
}
LOG.debug("Successfully activated datacenter.");
future.set(RpcResultBuilder.<ActivateEosDatacenterOutput>success().build());
}
final DeactivateEosDatacenterInput input) {
LOG.debug("Deactivating EOS Datacenter");
final SettableFuture<RpcResult<DeactivateEosDatacenterOutput>> future = SettableFuture.create();
final DeactivateEosDatacenterInput input) {
LOG.debug("Deactivating EOS Datacenter");
final SettableFuture<RpcResult<DeactivateEosDatacenterOutput>> future = SettableFuture.create();
LOG.debug("Successfully deactivated datacenter.");
future.set(RpcResultBuilder.<DeactivateEosDatacenterOutput>success().build());
}
LOG.debug("Successfully deactivated datacenter.");
future.set(RpcResultBuilder.<DeactivateEosDatacenterOutput>success().build());
}