Code Review
/
openflowplugin.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Technical Debt part 2"
[openflowplugin.git]
/
openflowplugin-api
/
src
/
main
/
java
/
org
/
opendaylight
/
openflowplugin
/
api
/
openflow
/
device
/
DeviceState.java
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 d5e926d8d85d210ed8d1bb27b3f572a17bce4c10..0ca7e2df60eb99d58c089dde12e859b1ff83e81d 100644
(file)
--- 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,27
+8,10
@@
package org.opendaylight.openflowplugin.api.openflow.device;
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
- */
- NodeId getNodeId();
-
- /**
- * @return the features of corresponding switch
- */
- GetFeaturesOutput getFeatures();
+public interface DeviceState extends DeviceSynchronizeListener, DeviceValidListener {
/**
* @return true if this session is valid
/**
* @return true if this session is valid
@@
-36,73
+19,76
@@
public interface DeviceState {
boolean isValid();
/**
boolean isValid();
/**
- * @param valid the valid to set
+ * Return true if we have relevant meter information
+ * from device
+ *
+ * @return
*/
*/
-
void setValid(boolean valid
);
+
boolean isMetersAvailable(
);
/**
/**
- * Returns a map containing all OFPhysicalPorts of this switch.
- *
- * @return The Map of OFPhysicalPort
+ * Set information about meter statistics availability.
*/
*/
-
Map<Long, PortGrouping> getPhysicalPorts(
);
+
void setMeterAvailable(boolean available
);
/**
/**
- * Returns a map containing all bandwidths for all OFPorts of this switch.
+ * Return true if we have relevant group information
+ * from device
*
*
- * @return
The Map of bandwidths for all OFPorts
+ * @return
*/
*/
-
Map<Long, Long> getPortsBandwidth
();
+
boolean isGroupAvailable
();
/**
/**
- * Returns a Set containing all port IDs of this switch.
- *
- * @return The Set of port ID
+ * Set information about group statistics availability.
*/
*/
-
Set<Long> getPorts(
);
+
void setGroupAvailable(boolean available
);
/**
/**
- *
Returns OFPhysicalPort 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 OFPhysicalPort for the specified PortNumber
+ * @return
*/
*/
-
PortGrouping getPhysicalPort(Long portNumber
);
+
boolean deviceSynchronized(
);
/**
/**
- *
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 isFlowStatisticsAvailable();
+
+ void setFlowStatisticsAvailable(boolean available);
/**
/**
- *
Returns True if the port is enabled,
+ *
Method returns true, if device capabilities provides table statistics.
*
*
- * @param portNumber
- * @return True if the port is enabled
+ * @return
*/
*/
- boolean isPortEnabled(long portNumber);
+ boolean isTableStatisticsAvailable();
+
+ void setTableStatisticsAvailable(boolean available);
/**
/**
- *
Returns True if the port is enabled
.
+ *
Method returns true, if device capabilities provides flow statistics
.
*
*
- * @param port
- * @return True if the port is enabled
+ * @return
*/
*/
- boolean isPortEnabled(PortGrouping port);
+ boolean isPortStatisticsAvailable();
+
+ void setPortStatisticsAvailable(boolean available);
/**
/**
- *
Returns a list containing all enabled ports of this switch
.
+ *
Method returns true, if device capabilities provides queue statistics
.
*
*
- * @return
List containing all enabled ports of this switch
+ * @return
*/
*/
-
List<PortGrouping> getEnabledPorts
();
+
boolean isQueueStatisticsAvailable
();
- /**
- * @return seed value for random operations
- */
- int getSeed();
+ void setQueueStatisticsAvailable(boolean available);
+
+ boolean isStatisticsPollingEnabled();
+
+ void setStatisticsPollingEnabledProp(boolean statPollEnabled);
}
}