Bug 5596 Cleaning part 1
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / device / DeviceState.java
index fd879ba67d1ecf99861525f31808c0d2e6d53a2f..becc8d09cb25ee177bad18cfe1e3178a760d06d2 100644 (file)
 
 package org.opendaylight.openflowplugin.api.openflow.device;
 
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
-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 java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 /**
- * Created by Martin Bobak <mbobak@cisco.com> on 25.2.2015.
+ * Holder of device's structure
  */
 public interface DeviceState {
 
     /**
-     * @return id of encapsulated node
+     * Return true if we have relevant meter information
+     * from device
+     *
+     * @return
      */
-    NodeId getNodeId();
+    boolean isMetersAvailable();
 
     /**
-     * @return the features of corresponding switch
+     * Set information about meter statistics availability.
      */
-    GetFeaturesOutput getFeatures();
+    void setMeterAvailable(boolean available);
 
     /**
-     * @return true if this session is valid
+     * Return true if we have relevant group information
+     * from device
+     *
+     * @return
      */
-    boolean isValid();
+    boolean isGroupAvailable();
 
     /**
-     * @param valid the valid to set
+     * Set information about group statistics availability.
      */
-    void setValid(boolean valid);
+    void setGroupAvailable(boolean available);
 
     /**
-     * Returns a map containing all OFPhysicalPorts of this switch.
+     * Method returns true, if device capabilities provides flow statistics.
      *
-     * @return The Map of OFPhysicalPort
+     * @return
      */
-    Map<Long, PortGrouping> getPhysicalPorts();
+    boolean isFlowStatisticsAvailable();
 
-    /**
-     * Returns a map containing all bandwidths for all OFPorts of this switch.
-     *
-     * @return The Map of bandwidths for all OFPorts
-     */
-    Map<Long, Long> getPortsBandwidth();
+    void setFlowStatisticsAvailable(boolean available);
 
     /**
-     * Returns a Set containing all port IDs of this switch.
+     * Method returns true, if device capabilities provides table statistics.
      *
-     * @return The Set of port ID
+     * @return
      */
-    Set<Long> getPorts();
+    boolean isTableStatisticsAvailable();
 
-    /**
-     * Returns OFPhysicalPort of the specified portNumber of this switch.
-     *
-     * @param portNumber The port ID
-     * @return OFPhysicalPort for the specified PortNumber
-     */
-    PortGrouping getPhysicalPort(Long portNumber);
+    void setTableStatisticsAvailable(boolean available);
 
     /**
-     * Returns the bandwidth of the specified portNumber of this switch.
+     * Method returns true, if device capabilities provides flow statistics.
      *
-     * @param portNumber the port ID
-     * @return bandwidth
+     * @return
      */
-    Long getPortBandwidth(Long portNumber);
+    boolean isPortStatisticsAvailable();
 
-    /**
-     * Returns True if the port is enabled,
-     *
-     * @param portNumber
-     * @return True if the port is enabled
-     */
-    boolean isPortEnabled(long portNumber);
+    void setPortStatisticsAvailable(boolean available);
 
     /**
-     * Returns True if the port is enabled.
+     * Method returns true, if device capabilities provides queue statistics.
      *
-     * @param port
-     * @return True if the port is enabled
+     * @return
      */
-    boolean isPortEnabled(PortGrouping port);
+    boolean isQueueStatisticsAvailable();
 
-    /**
-     * Returns a list containing all enabled ports of this switch.
-     *
-     * @return List containing all enabled ports of this switch
-     */
-    List<PortGrouping> getEnabledPorts();
+    void setQueueStatisticsAvailable(boolean available);
 
-    /**
-     * @return seed value for random operations
-     */
-    int getSeed();
+    boolean isStatisticsPollingEnabled();
 
 }