code: public void stop(int mode)
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "stop", Integer.valueOf(mode));
  
          boolean performingTheStop = false;
  
          // First change the state of the dispatcher
          synchronized(this)
          {
              if (_running && !_stopRequested)
              {
                  performingTheStop = true;
  
                  // Make sure that the dispatcher threads notice that we are stopping
                  _stopRequested = true;
              }
          } // end synchronized
  
  
          // Are we performing the stop or is it stopping already?
          if (performingTheStop)
          {
              for (int i = 0; i < _maxThreads; i++)
              {
                  _workers[i].cleanup();
              }
  
              // Now wait for the dispatcher threads to stop.
              // They should stop quickly unless they're stuck inside JDBC so
              // we only allow 60 seconds in total to join all of the threads
              long limitStopMillis = System.currentTimeMillis() + 60000;
  
              for (int i = 0; i < _maxThreads; i++)
              {
                  long remainingStopDelay = limitStopMillis - System.currentTimeMillis();
                  if (remainingStopDelay <= 0)
                  {
                      remainingStopDelay = 1;
                  }
  
                  try
                  {
                      if (_threads[i] != null)
                      {
                          _threads[i].join(remainingStopDelay);
                          if (_threads[i].isAlive())
                          {
                              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Cannot join dispatcher thread " + _workers[i]);
                          }
                      }
                  }
                  catch (InterruptedException ie)
                  {
                      //No FFDC Code Needed.
                  }
              }
          } // end if (performingTheStop)
  
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "stop");
      }
docs: /* (non-Javadoc)
  @see com.ibm.ws.sib.msgstore.persistence.Dispatcher#stop(int)