Exemplo n.º 1
0
 public virtual void StopTrashCleaner()
 {
     if (trashCleaner != null)
     {
         trashCleaner.Interrupt();
     }
 }
Exemplo n.º 2
0
 internal virtual void StopMonitor()
 {
     if (lmthread != null)
     {
         shouldRunMonitor = false;
         try
         {
             lmthread.Interrupt();
             lmthread.Join(3000);
         }
         catch (Exception ie)
         {
             Log.Warn("Encountered exception ", ie);
         }
         lmthread = null;
     }
 }
 /*
  * Shuts down the pending replication monitor thread.
  * Waits for the thread to exit.
  */
 internal virtual void Stop()
 {
     fsRunning = false;
     if (timerThread == null)
     {
         return;
     }
     timerThread.Interrupt();
     try
     {
         timerThread.Join(3000);
     }
     catch (Exception)
     {
     }
 }
Exemplo n.º 4
0
 internal virtual void Close()
 {
     Clear();
     if (daemon != null)
     {
         daemon.Interrupt();
         try
         {
             daemon.Join();
         }
         catch (Exception)
         {
             throw new RuntimeException("failed to join thread");
         }
     }
     daemon = null;
 }
Exemplo n.º 5
0
        /// <exception cref="System.Exception"/>
        internal virtual void InterruptAndJoin()
        {
            Daemon daemonCopy = null;

            lock (this)
            {
                if (IsRunning())
                {
                    daemon.Interrupt();
                    daemonCopy = daemon;
                }
            }
            if (daemonCopy != null)
            {
                if (Log.IsDebugEnabled())
                {
                    Log.Debug("Wait for lease checker to terminate");
                }
                daemonCopy.Join();
            }
        }