X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=third-party%2Fopenflow-codec%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenflow%2Fcodec%2Fprotocol%2Fstatistics%2FOFPTableStatistics.java;fp=third-party%2Fopenflow-codec%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenflow%2Fcodec%2Fprotocol%2Fstatistics%2FOFPTableStatistics.java;h=0000000000000000000000000000000000000000;hb=64fe0fbca1a6c2b77ad25f568d73a7eb64236d16;hp=0bb2b6d01f07151c47ae12d4cb0e9fc85b829a49;hpb=8b9a3ff2bbc83941254b46b818cbbae5cc1a3a5b;p=openflowjava.git diff --git a/third-party/openflow-codec/src/main/java/org/openflow/codec/protocol/statistics/OFPTableStatistics.java b/third-party/openflow-codec/src/main/java/org/openflow/codec/protocol/statistics/OFPTableStatistics.java deleted file mode 100644 index 0bb2b6d0..00000000 --- a/third-party/openflow-codec/src/main/java/org/openflow/codec/protocol/statistics/OFPTableStatistics.java +++ /dev/null @@ -1,145 +0,0 @@ -package org.openflow.codec.protocol.statistics; - -import java.io.Serializable; - -import org.openflow.codec.io.IDataBuffer; - -/** - * Represents an ofp_table_stats structure - * - * @author David Erickson (daviderickson@cs.stanford.edu) - * @author AnilGujele - */ -public class OFPTableStatistics implements OFPStatistics, Serializable { - private static final int MINIMUM_LENGTH = 24; - - protected byte tableId; - protected int activeCount; - protected long lookupCount; - protected long matchedCount; - - /** - * @return the tableId - */ - public byte getTableId() { - return tableId; - } - - /** - * @param tableId - * the tableId to set - */ - public void setTableId(byte tableId) { - this.tableId = tableId; - } - - /** - * @return the activeCount - */ - public int getActiveCount() { - return activeCount; - } - - /** - * @param activeCount - * the activeCount to set - */ - public void setActiveCount(int activeCount) { - this.activeCount = activeCount; - } - - /** - * @return the lookupCount - */ - public long getLookupCount() { - return lookupCount; - } - - /** - * @param lookupCount - * the lookupCount to set - */ - public void setLookupCount(long lookupCount) { - this.lookupCount = lookupCount; - } - - /** - * @return the matchedCount - */ - public long getMatchedCount() { - return matchedCount; - } - - /** - * @param matchedCount - * the matchedCount to set - */ - public void setMatchedCount(long matchedCount) { - this.matchedCount = matchedCount; - } - - @Override - public int getLength() { - return MINIMUM_LENGTH; - } - - @Override - public void readFrom(IDataBuffer data) { - this.tableId = data.get(); - data.get(); // pad - data.get(); // pad - data.get(); // pad - this.activeCount = data.getInt(); - this.lookupCount = data.getLong(); - this.matchedCount = data.getLong(); - } - - @Override - public void writeTo(IDataBuffer data) { - data.put(this.tableId); - data.put((byte) 0); // pad - data.put((byte) 0); // pad - data.put((byte) 0); // pad - data.putInt(this.activeCount); - data.putLong(this.lookupCount); - data.putLong(this.matchedCount); - } - - @Override - public int hashCode() { - final int prime = 449; - int result = 1; - result = prime * result + activeCount; - result = prime * result + (int) (lookupCount ^ (lookupCount >>> 32)); - result = prime * result + (int) (matchedCount ^ (matchedCount >>> 32)); - result = prime * result + tableId; - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (!(obj instanceof OFPTableStatistics)) { - return false; - } - OFPTableStatistics other = (OFPTableStatistics) obj; - if (activeCount != other.activeCount) { - return false; - } - if (lookupCount != other.lookupCount) { - return false; - } - if (matchedCount != other.matchedCount) { - return false; - } - if (tableId != other.tableId) { - return false; - } - return true; - } -}