X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Feos-dom-akka%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Feos%2Fakka%2FDataCenterControl.java;fp=opendaylight%2Fmd-sal%2Feos-dom-akka%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Feos%2Fakka%2FDataCenterControl.java;h=cb9cff97adedba706bcb275f7dc4f4573fa38acc;hb=55d8c678f2e25c8b9e78b3dad686de287b4ae5ea;hp=0000000000000000000000000000000000000000;hpb=9424ca135f6f29183d8708c85485035572818289;p=controller.git diff --git a/opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/DataCenterControl.java b/opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/DataCenterControl.java new file mode 100644 index 0000000000..cb9cff97ad --- /dev/null +++ b/opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/DataCenterControl.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.controller.eos.akka; + +import com.google.common.annotations.Beta; +import com.google.common.util.concurrent.ListenableFuture; +import org.eclipse.jdt.annotation.NonNull; +import org.opendaylight.yangtools.yang.common.Empty; + +/** + * Service used to bring up/down the NativeEos service in individual datacenters. + * Active datacenter in native eos terms means that the candidates from this datacenter can become owners of entities. + * Additionally the singleton component makings ownership decisions, runs only in an active datacenter. + * + *

+ * Caller must make sure that only one datacenter is active at a time, otherwise the singleton actors + * in each datacenter will interfere with each other. The methods provided byt this service can be called + * on any node from the datacenter to be activated. Datacenters only need to brought up when using non-default + * datacenter or multiple datacenters. + */ +@Beta +public interface DataCenterControl { + /** + * Activates the native eos service in the datacenter that this method is called. + */ + @NonNull ListenableFuture activateDataCenter(); + + /** + * Deactivates the native eos service in the datacenter that this method is called. + * + * @return Completion future + */ + @NonNull ListenableFuture deactivateDataCenter(); +}