public void suspend() throws SuspendException
   {
      latcher.set(new CountDownLatch(1));
      isSuspended.set(true);

      if (workingThreads.get() > 0)
      {
         synchronized (workingThreads)
         {
            while (workingThreads.get() > 0)
            {
               try
               {
                  workingThreads.wait();
               }
               catch (InterruptedException e)
               {
                  if (log.isTraceEnabled())
                  {
                     log.trace(e.getMessage(), e);
                  }
               }
            }
         }
      }

      closeAndKeepWaitingThreads(false);
   }
public void suspend ( ) throws SuspendException { latcher . set ( new CountDownLatch ( 1 ) ) ; isSuspended . set ( true ) ; if ( workingThreads . get ( ) > 0 ) { synchronized ( workingThreads ) { while ( workingThreads . get ( ) > 0 ) { try { workingThreads . wait ( ) ; } catch ( InterruptedException e ) { if ( log . isTraceEnabled ( ) ) { log . trace ( e . getMessage ( ) , e ) ; } } } } } closeAndKeepWaitingThreads ( false ) ; }
{@inheritDoc}