Bug 6714 - Use singleton service in clustered netconf topology
[netconf.git] / netconf / abstract-topology / src / main / java / org / opendaylight / netconf / topology / TopologyManager.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.netconf.topology;
10
11 import akka.actor.TypedActor.PostStop;
12 import akka.actor.TypedActor.PreStart;
13 import akka.actor.TypedActor.Receiver;
14 import com.google.common.annotations.Beta;
15 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
16 import scala.concurrent.Future;
17
18 /**
19  * Top level topology manager that handles comunication between nodes, aggregates results, and handles writes into the datastore
20  */
21 @Beta
22 public interface TopologyManager extends NodeListener, Receiver, RemoteNodeListener, PreStart, PostStop{
23
24     /**
25      * ask if this manager is master
26      * @return true/false based on ownership status
27      */
28     Future<Boolean> isMaster();
29
30     /**
31      *
32      * @param nodeId - id of the node that sessionUp/Down happened on
33      */
34     void notifyNodeStatusChange(NodeId nodeId);
35
36     boolean hasAllPeersUp();
37
38 }