X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fapi%2Fopenflow%2Fdevice%2FDeviceState.java;h=0ca7e2df60eb99d58c089dde12e859b1ff83e81d;hb=7485246189351c3e8d052b3fbd9c507ae4284d0b;hp=6584f69383d3e16ddd2e021711dbf137d558f2ce;hpb=f74dab9e40cc10fd0a3d6e77c1fece2e16db489c;p=openflowplugin.git diff --git a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/DeviceState.java b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/DeviceState.java index 6584f69383..0ca7e2df60 100644 --- a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/DeviceState.java +++ b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/DeviceState.java @@ -8,35 +8,10 @@ package org.opendaylight.openflowplugin.api.openflow.device; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId; -import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node; -import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; -import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput; -import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortGrouping; -import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; - /** - * Created by Martin Bobak <mbobak@cisco.com> on 25.2.2015. + * Holder of device's structure */ -public interface DeviceState { - - /** - * @return id of encapsulated node - */ - NodeId getNodeId(); - - /** - * @return {@link Node} instance identifier - */ - KeyedInstanceIdentifier getNodeInstanceIdentifier(); - - /** - * @return the features of corresponding switch - */ - GetFeaturesOutput getFeatures(); +public interface DeviceState extends DeviceSynchronizeListener, DeviceValidListener { /** * @return true if this session is valid @@ -44,80 +19,76 @@ public interface DeviceState { boolean isValid(); /** - * @param valid the valid to set - */ - void setValid(boolean valid); - - /** - * Returns a map containing all OFPhysicalPorts of this switch. + * Return true if we have relevant meter information + * from device * - * @return The Map of OFPhysicalPort + * @return */ - Map getPhysicalPorts(); + boolean isMetersAvailable(); /** - * Returns a map containing all bandwidths for all OFPorts of this switch. - * - * @return The Map of bandwidths for all OFPorts + * Set information about meter statistics availability. */ - Map getPortsBandwidth(); + void setMeterAvailable(boolean available); /** - * Returns a Set containing all port IDs of this switch. + * Return true if we have relevant group information + * from device * - * @return The Set of port ID + * @return */ - Set getPorts(); + boolean isGroupAvailable(); /** - * Returns OFPhysicalPort of the specified portNumber of this switch. - * - * @param portNumber The port ID - * @return OFPhysicalPort for the specified PortNumber + * Set information about group statistics availability. */ - PortGrouping getPhysicalPort(Long portNumber); + void setGroupAvailable(boolean available); /** - * Returns the bandwidth of the specified portNumber of this switch. + * Method returns true if initial statistics data were collected and written to DS. * - * @param portNumber the port ID - * @return bandwidth + * @return */ - Long getPortBandwidth(Long portNumber); + boolean deviceSynchronized(); /** - * Returns True if the port is enabled, + * Method returns true, if device capabilities provides flow statistics. * - * @param portNumber - * @return True if the port is enabled + * @return */ - boolean isPortEnabled(long portNumber); + boolean isFlowStatisticsAvailable(); + + void setFlowStatisticsAvailable(boolean available); /** - * Returns True if the port is enabled. + * Method returns true, if device capabilities provides table statistics. * - * @param port - * @return True if the port is enabled + * @return */ - boolean isPortEnabled(PortGrouping port); + boolean isTableStatisticsAvailable(); + + void setTableStatisticsAvailable(boolean available); /** - * Returns a list containing all enabled ports of this switch. + * Method returns true, if device capabilities provides flow statistics. * - * @return List containing all enabled ports of this switch + * @return */ - List getEnabledPorts(); + boolean isPortStatisticsAvailable(); + + void setPortStatisticsAvailable(boolean available); /** - * Return node current OF protocol version + * Method returns true, if device capabilities provides queue statistics. * * @return */ - short getVersion(); + boolean isQueueStatisticsAvailable(); - /** - * @return seed value for random operations - */ - int getSeed(); + void setQueueStatisticsAvailable(boolean available); + + boolean isStatisticsPollingEnabled(); + + void setStatisticsPollingEnabledProp(boolean statPollEnabled); }