2 * Copyright (c) 2014 Cisco Systems, Inc. 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
9 package org.opendaylight.controller.md.statistics.manager;
11 import java.util.List;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
14 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
18 * org.opendaylight.controller.md.statistics.manager
21 * Class implement {@link Runnable} and inside is running statistic collecting
22 * process DataObject statistics by DataObject statistics for every {@link org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode}.
23 * Every statistics wait to finish previous statistics. Only if all statistics finish,
24 * next {@link org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode}
25 * Statistics should be collecting. We are able to set minimal time for start next round cross all Network,
26 * but all depends on network possibility.
28 * @author <a href="mailto:vdemcak@cisco.com">Vaclav Demcak</a>
30 * Created: Aug 28, 2014
32 public interface StatPermCollector extends Runnable, AutoCloseable {
36 * Enum class refers ofp_statistics capabilities fields from OF Switch
37 * capabilities specification which have to come as a post HandShake
38 * information from OF Switch and Inventory Manager adds all to the
40 * If the capabilities are not add (for any reason) NodeRegistrator
41 * adds all StatCapTypes for the {@link Node}.
43 public enum StatCapabTypes {
65 * Meter statistics has no support from OF Switch capabilities
66 * so we have to try get statistics for it and wait for response
67 * Error or response package with results.
73 * Add new connected node for permanent statistics collecting process
77 * @param nrOfSwitchTables
78 * @return true/false if the {@link Node} added successful
80 boolean connectedNodeRegistration(InstanceIdentifier<Node> nodeIdent,
81 List<StatCapabTypes> statTypes, Short nrOfSwitchTables);
84 * All disconnected Nodes need be removed from stat list Nodes
86 * @return true/false if the {@link Node} removed successful
88 boolean disconnectedNodeUnregistration(InstanceIdentifier<Node> nodeIdent);
91 * Method return true only and only if {@link StatPermCollector} contain
92 * valid node registration in its internal {@link Node} map.
93 * Otherwise return false.
95 * @param InstanceIdentifier<FlowCapableNode> flowNode
98 boolean isProvidedFlowNodeActive(InstanceIdentifier<Node> nodeIdent);
101 * Object notification for continue statistics collecting process.
102 * It is call from collecting allStatistics methods as a future result for
103 * Operational/DS statistic store call (does not matter in the outcome).
105 void collectNextStatistics();
108 * Method returns true if collector has registered some active nodes
109 * otherwise return false.
113 boolean hasActiveNodes();