X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fconnectionmanager%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconnectionmanager%2FIConnectionManager.java;fp=opendaylight%2Fconnectionmanager%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconnectionmanager%2FIConnectionManager.java;h=c7e7fa4770a171052544bd7f1da3522b3c0af4a8;hp=106d14dc39abd69a718c7634a9639a2ec9374519;hb=eb9aaa98f3e850d633bd81598c467f6b5961e13e;hpb=47c8b781b163ccf652a043e060582ec1904787d4 diff --git a/opendaylight/connectionmanager/api/src/main/java/org/opendaylight/controller/connectionmanager/IConnectionManager.java b/opendaylight/connectionmanager/api/src/main/java/org/opendaylight/controller/connectionmanager/IConnectionManager.java index 106d14dc39..c7e7fa4770 100644 --- a/opendaylight/connectionmanager/api/src/main/java/org/opendaylight/controller/connectionmanager/IConnectionManager.java +++ b/opendaylight/connectionmanager/api/src/main/java/org/opendaylight/controller/connectionmanager/IConnectionManager.java @@ -1,4 +1,3 @@ - /* * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. * @@ -19,36 +18,40 @@ import org.opendaylight.controller.sal.core.Node; import org.opendaylight.controller.sal.utils.Status; /** - * Connection Manager provides south-bound connectivity services. - * The APIs are currently focused towards Active-Active Clustering support - * wherein the node can connect to any of the Active Controller in the Cluster. - * This component can also host the necessary logic for south-bound connectivity - * when partial cluster is identified during Partition scenarios. + * Connection Manager provides south-bound connectivity services. The APIs are + * currently focused towards Active-Active Clustering support wherein the node + * can connect to any of the Active Controller in the Cluster. This component + * can also host the necessary logic for south-bound connectivity when partial + * cluster is identified during Partition scenarios. * - * This (and its corresponding implementation) component can also be enhanced further - * for more fancy algorithms/criteria for connection acceptance. + * This (and its corresponding implementation) component can also be enhanced + * further for more fancy algorithms/criteria for connection acceptance. */ public interface IConnectionManager { /** - * This method returns Connectivity Algorithm (Scheme) that is currently being used. + * This method returns Connectivity Algorithm (Scheme) that is currently + * being used. * * @return ConnectionMgmtScheme Enum that represents the active scheme. */ public ConnectionMgmtScheme getActiveScheme(); /** - * Method that will retrieve and return a Set of Nodes that is currently connected to the given controller. + * Method that will retrieve and return a Set of Nodes that is currently + * connected to the given controller. * - * @param controller InetAddress of the Controller that is currently connected to a set of Nodes. + * @param controller + * InetAddress of the Controller that is currently connected to a + * set of Nodes. * * @return Set Set of Nodes connected to a controller. */ public Set getNodes(InetAddress controller); /** - * Method that will retrieve and return a Set of Nodes that is currently connected to - * the controller on which this method is executed. + * Method that will retrieve and return a Set of Nodes that is currently + * connected to the controller on which this method is executed. * * @return Set Set of Nodes connected to this controller. */ @@ -57,21 +60,24 @@ public interface IConnectionManager { /** * @deprecated Use getLocalityStatus(Node node) instead. * - * Method to test if a node is local to a controller. + * Method to test if a node is local to a controller. * - * @param node The node for which the locality is being tested + * @param node + * The node for which the locality is being tested * @return true if node is local to this controller.
- * false if either node is not connected to this controller or - * not connected to any other controllers in the cluster. + * false if either node is not connected to this controller or not + * connected to any other controllers in the cluster. */ public boolean isLocal(Node node); /** - * getLocalityStatus provides the tri-state connectivity status as opposed to the - * binary status returned by isLocal. - * ConnectionLocality enum that is returned by this method also includes the case of - * a Node not connected to any of the controllers in the cluster. - * @param node The node for which the locality is being verified + * getLocalityStatus provides the tri-state connectivity status as opposed + * to the binary status returned by isLocal. ConnectionLocality enum that is + * returned by this method also includes the case of a Node not connected to + * any of the controllers in the cluster. + * + * @param node + * The node for which the locality is being verified * @return ConnectionLocality */ public ConnectionLocality getLocalityStatus(Node node); @@ -86,25 +92,49 @@ public interface IConnectionManager { /** * Connect to a node * - * @param connectionIdentifier identifier with which the application would refer to a given connection. - * @param params Connection Params in Map format. This is entirely handled by the south-bound - * plugins and is an opaque value for SAL or Connection Manager. Typical values keyed inside - * this params are Management IP-Address, Username, Password, Security Keys, etc... + * @param connectionIdentifier + * identifier with which the application would refer to a given + * connection. + * @param params + * Connection Params in Map format. This is entirely handled by + * the south-bound plugins and is an opaque value for SAL or + * Connection Manager. Typical values keyed inside this params + * are Management IP-Address, Username, Password, Security Keys, + * etc... * - * @return Node Node connected to. + * @return Node Node connected to. */ - public Node connect (String connectionIdentifier, Map params); + public Node connect(String connectionIdentifier, + Map params); /** * Connect to a node * - * @param type Type of the node representing NodeIDType. - * @param connectionIdentifier identifier with which the application would refer to a given connection. - * @param params Connection Params in Map format. This is entirely handled by the south-bound - * plugins and is an opaque value for SAL or Connection Manager. Typical values keyed inside - * this params are Management IP-Address, Username, Password, Security Keys, etc... + * @param type + * Type of the node representing NodeIDType. + * @param connectionIdentifier + * identifier with which the application would refer to a given + * connection. + * @param params + * Connection Params in Map format. This is entirely handled by + * the south-bound plugins and is an opaque value for SAL or + * Connection Manager. Typical values keyed inside this params + * are Management IP-Address, Username, Password, Security Keys, + * etc... + * + * @return Status of the Connect Operation. + */ + public Node connect(String type, String connectionIdentifier, + Map params); + + /** + * Retrieve list of cluster-members to which Node is connected to + * + * @param node + * Node for which cluster-members to be retrieved * - * @return Status of the Connect Operation. + * @return Set List of cluster-member addresses to which the + * node is connected */ - public Node connect(String type, String connectionIdentifier, Map params); + public Set getControllers(Node node); }