throw new IllegalStateException("Cannot find binding for queue name: " + st.getQueueName());
if (trace) { log.trace(this.nodeId + " cannot find binding for queue " + st.getQueueName() + " it could have been unbound"); }
   public void updateQueueStats(int nodeId, List statsList) throws Exception   {      lock.readLock().acquire();            if (trace) { log.trace(this.nodeId + " updating queue stats from node " + nodeId + " stats size: " + statsList.size()); }            try      {               if (nodeId == this.nodeId)         {            //Sanity check            throw new IllegalStateException("Cannot update queue stats for current node");         }                  Map nameMap = (Map)nameMaps.get(new Integer(nodeId));                  if (nameMap == null)         {            //This is ok, the node might have left            if (trace) { log.trace(this.nodeId + " cannot find node in name map, i guess the node might have left?"); }         }         else         {                 Iterator iter = statsList.iterator();                        while (iter.hasNext())            {               QueueStats st = (QueueStats)iter.next();                              Binding bb = (Binding)nameMap.get(st.getQueueName());                              if (bb == null)               {                  throw new IllegalStateException("Cannot find binding for queue name: " + st.getQueueName());               }                              RemoteQueueStub stub = (RemoteQueueStub)bb.getQueue();                              stub.setStats(st);                              if (trace) { log.trace(this.nodeId + " setting stats: " + st + " on remote stub " + stub.getName()); }                              ClusterRouter router = (ClusterRouter)routerMap.get(st.getQueueName());                              //Maybe the local queue now wants to pull message(s) from the remote queue given that the                //stats for the remote queue have changed               LocalClusteredQueue localQueue = router.getLocalQueue();                              if (localQueue != null)               {                                 RemoteQueueStub toQueue = (RemoteQueueStub)messagePullPolicy.chooseQueue(router.getQueues());                                    if (trace) { log.trace(this.nodeId + " recalculated pull queue for queue " + st.getQueueName() + " to be " + toQueue); }                                    if (toQueue != null)                  {                     localQueue.setPullInfo(toQueue, pullSize);                                          //We now trigger delivery - this may cause a pull event                     localQueue.deliver(false);                                                               if (trace) { log.trace(this.nodeId + " triggered delivery for " + localQueue.getName()); }                  }               }                           }                  }               }      finally      {         lock.readLock().release();            }   }      