2 * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.eos.akka;
10 import com.google.common.annotations.Beta;
11 import com.google.common.util.concurrent.ListenableFuture;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.yangtools.yang.common.Empty;
16 * Service used to bring up/down the NativeEos service in individual datacenters.
17 * Active datacenter in native eos terms means that the candidates from this datacenter can become owners of entities.
18 * Additionally the singleton component makings ownership decisions, runs only in an active datacenter.
21 * Caller must make sure that only one datacenter is active at a time, otherwise the singleton actors
22 * in each datacenter will interfere with each other. The methods provided byt this service can be called
23 * on any node from the datacenter to be activated. Datacenters only need to brought up when using non-default
24 * datacenter or multiple datacenters.
27 public interface DataCenterControl {
29 * Activates the native eos service in the datacenter that this method is called.
31 @NonNull ListenableFuture<Empty> activateDataCenter();
34 * Deactivates the native eos service in the datacenter that this method is called.
36 * @return Completion future
38 @NonNull ListenableFuture<Empty> deactivateDataCenter();