public virtual void StopTrashCleaner() { if (trashCleaner != null) { trashCleaner.Interrupt(); } }
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) { } }
internal virtual void Close() { Clear(); if (daemon != null) { daemon.Interrupt(); try { daemon.Join(); } catch (Exception) { throw new RuntimeException("failed to join thread"); } } daemon = null; }
/// <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(); } }