docs: public void dispatch(Collection tasks, PersistentTransaction tran, boolean canReject) throws PersistenceException, SevereMessageStoreException
      {
          // tran is not traced because it is ignored
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "dispatch", new Object[] {tasks, Boolean.valueOf(canReject)});
  
          int taskCount = 0;
  
          long dispatchTime = System.currentTimeMillis();
  
          if (tasks != null)
          {
              boolean mustWait = false;
  
              taskCount = tasks.size();
  
              // We need to provide an object upon which we will wait for
              // notification that our work has been dispatched.
              DispatchNotifier waitHere = new DispatchNotifier(taskCount, canReject);
  
              // Array of flags for threads which need to be notified
              boolean[] mustNotifyThreads = new boolean[_maxThreads];
  
              // Array of flags for threads for which we need to wait for dispatch
              boolean[] mustWaitThreads = new boolean[_maxThreads];
  
              // Add the tasks to the appropriate queues
              Iterator it = tasks.iterator();
              while (it.hasNext())
              {
                  Task task = (Task)it.next();
  
                  // Ensure that the task is a standalone logical entity so the
                  // data written is transactionally clean (i.e. committed)
                  task.copyDataIfVulnerable();
  
                  // Ensure that the persistable is not discarded prematurely
                  ((Tuple)task.getPersistable()).persistableOperationBegun();
  
                  // Tasks are distributed amongst the various threads' queues
                  int threadnum = (int)(task.getPersistable().getUniqueId() % _maxThreads);
  
                  // Dispatch to a thread
                  mustWaitThreads[threadnum] = _workers[threadnum].addTask(task, dispatchTime, waitHere);
                  mustNotifyThreads[threadnum] = true;
              } // end while
  
              // Notify the threads affected by the dispatch request that there's
              // work to do            
              for (int i = 0; i < _maxThreads; i++)
              {
                  if (mustNotifyThreads[i])
                  {
                      _workers[i].notifyDispatchArrived();
                  }
  
                  mustWait |= mustWaitThreads[i];
              }
  
              // Wait for our work to be dispatched
              if (mustWait)
              {
                  try
                  {
                      waitHere.waitForDispatch();
                  }
                  catch (PersistenceException pe)
                  {
                      // Since the SpillDispatcher never rejects work, this case should not occur
                  	com.ibm.ws.ffdc.FFDCFilter.processException(pe, "com.ibm.ws.sib.msgstore.persistence.impl.SpillDispatcher.writeBatch", "1:326:1.48", this);
                      if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Exception persisting batch", pe);
                  } // end try-catch
              }
          }
  
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "dispatch");
      }