X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fstatistics-manager%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fstatistics%2Fmanager%2FMultipartMessageManager.java;h=998d5d8faaf24fd09e10d6a5865f1a5c169e6d96;hb=335aee8c6154a25c76503223e636398d32135bc9;hp=11cce72ef1516655e26d7a5b28daaa37d880d5f9;hpb=c0497aa3c01474dd6c65a2b4f149feffc12ed90b;p=controller.git diff --git a/opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/MultipartMessageManager.java b/opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/MultipartMessageManager.java index 11cce72ef1..998d5d8faa 100644 --- a/opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/MultipartMessageManager.java +++ b/opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/MultipartMessageManager.java @@ -21,6 +21,17 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.transaction.rev131103. */ public class MultipartMessageManager { + /* + * Map for tx id and type of request, to keep track of all the request sent + * by Statistics Manager. Statistics Manager won't entertain any multipart + * response for which it didn't send the request. + */ + + private static Map txIdToRequestTypeMap = new ConcurrentHashMap(); + /* + * Map to keep track of the request tx id for flow table statistics request. + * Because flow table statistics multi part response do not contains the table id. + */ private static Map txIdTotableIdMap = new ConcurrentHashMap(); public MultipartMessageManager(){} @@ -34,4 +45,23 @@ public class MultipartMessageManager { public void setTxIdAndTableIdMapEntry(TransactionId id,Short tableId){ txIdTotableIdMap.put(id, tableId); } + + public void addTxIdToRequestTypeEntry (TransactionId id,StatsRequestType type){ + txIdToRequestTypeMap.put(id, type); + } + public StatsRequestType removeTxId(TransactionId id){ + return txIdToRequestTypeMap.remove(id); + } + + public enum StatsRequestType{ + ALL_FLOW, + AGGR_FLOW, + ALL_PORT, + ALL_FLOW_TABLE, + ALL_QUEUE_STATS, + ALL_GROUP, + ALL_METER, + GROUP_DESC, + METER_CONFIG + } }