Пример #1
0
 @Override
 public void cancelAllStatisticsReplies() {
   /* we don't need to be synchronized here. Even if another thread
    * modifies the map while we're cleaning up the future will eventuall
    * timeout */
   for (OFStatisticsFuture f : statsFutureMap.values()) {
     f.cancel(true);
   }
   statsFutureMap.clear();
   iofMsgListenersMap.clear();
 }
Пример #2
0
 @Override
 public void deliverStatisticsReply(OFMessage reply) {
   OFStatisticsFuture future = this.statsFutureMap.get(reply.getXid());
   if (future != null) {
     future.deliverFuture(this, reply);
     // The future will ultimately unregister itself and call
     // cancelStatisticsReply
     return;
   }
   /* Transaction id was not found in statsFutureMap.check the other map */
   IOFMessageListener caller = this.iofMsgListenersMap.get(reply.getXid());
   if (caller != null) {
     caller.receive(this, reply, null);
   }
 }