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.flow.transaction.rev131103.TransactionId;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
15 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
19 * org.opendaylight.controller.md.statistics.manager
22 * Class implement {@link Runnable} and inside is running statistic collecting
23 * process DataObject statistics by DataObject statistics for every {@link org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode}.
24 * Every statistics wait to finish previous statistics. Only if all statistics finish,
25 * next {@link org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode}
26 * Statistics should be collecting. We are able to set minimal time for start next round cross all Network,
27 * but all depends on network possibility.
29 * @author <a href="mailto:vdemcak@cisco.com">Vaclav Demcak</a>
31 * Created: Aug 28, 2014
33 public interface StatPermCollector extends Runnable, AutoCloseable {
37 * Enum class refers ofp_statistics capabilities fields from OF Switch
38 * capabilities specification which have to come as a post HandShake
39 * information from OF Switch and Inventory Manager adds all to the
41 * If the capabilities are not add (for any reason) NodeRegistrator
42 * adds all StatCapTypes for the {@link Node}.
44 public enum StatCapabTypes {
66 * Meter statistics has no support from OF Switch capabilities
67 * so we have to try get statistics for it and wait for response
68 * Error or response package with results.
74 * Add new connected node for permanent statistics collecting process
78 * @param nrOfSwitchTables
79 * @return true/false if the {@link Node} added successful
81 boolean connectedNodeRegistration(InstanceIdentifier<Node> nodeIdent,
82 List<StatCapabTypes> statTypes, Short nrOfSwitchTables);
85 * All disconnected Nodes need be removed from stat list Nodes
88 * @return true/false if the {@link Node} removed successful
90 boolean disconnectedNodeUnregistration(InstanceIdentifier<Node> nodeIdent);
93 * Method add new feature {@link StatCapabTypes} to Node identified by
94 * nodeIdent -> InstanceIdentifier<Node>
97 * @return true/false if the {@link StatCapabTypes} add successful
99 boolean registerAdditionalNodeFeature(InstanceIdentifier<Node> nodeIdent, StatCapabTypes statCapab);
102 * Method return true only and only if {@link StatPermCollector} contain
103 * valid node registration in its internal {@link Node} map.
104 * Otherwise return false.
109 boolean isProvidedFlowNodeActive(InstanceIdentifier<Node> nodeIdent);
112 * Object notification for continue statistics collecting process.
113 * It is call from collecting allStatistics methods as a future result for
114 * Operational/DS statistic store call (does not matter in the outcome).
116 void collectNextStatistics(TransactionId xid);
119 * Method returns true if collector has registered some active nodes
120 * otherwise return false.
124 boolean hasActiveNodes();