Fixed following issues
[openflowplugin.git] / applications / statistics-manager / src / main / java / org / opendaylight / openflowplugin / applications / statistics / manager / StatNodeRegistration.java
1 /**
2  * Copyright (c) 2014 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.openflowplugin.applications.statistics.manager;
10
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.flow.node.SwitchFeatures;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.OpendaylightInventoryListener;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
15 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
16
17 /**
18  * statistics-manager
19  * org.opendaylight.openflowplugin.applications.statistics.manager.impl
20  *
21  * StatNodeRegistration
22  * Class represents {@link org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode}
23  * {@link org.opendaylight.controller.md.sal.binding.api.DataChangeListener} in Operational/DataStore for ADD / REMOVE
24  * actions which are represented connect / disconnect OF actions. Connect functionality are expecting
25  *
26  * @author <a href="mailto:vdemcak@cisco.com">Vaclav Demcak</a>
27  *
28  * Created: Sep 5, 2014
29  */
30 public interface StatNodeRegistration extends OpendaylightInventoryListener, AutoCloseable {
31
32     /**
33      * Method contains {@link org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode} registration to {@link StatisticsManager}
34      * for permanently collecting statistics by {@link StatPermCollector} and
35      * as a prevention to use a validation check to the Operational/DS for identify
36      * connected {@link org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode}.
37      *
38      * @param keyIdent
39      * @param data
40      * @param nodeIdent
41      */
42     void connectFlowCapableNode(InstanceIdentifier<SwitchFeatures> keyIdent,
43             SwitchFeatures data, InstanceIdentifier<Node> nodeIdent);
44
45     /**
46      * Method cut {@link Node} registration for {@link StatPermCollector}
47      *
48      * @param keyIdent
49      */
50     void disconnectFlowCapableNode(InstanceIdentifier<Node> keyIdent);
51
52     /**
53      * Method returns if *this* instance of the stats-manager is owner of the node
54      * @param node Given Node
55      * @return true if owner, else false
56      */
57     boolean isFlowCapableNodeOwner(NodeId node);
58 }