@Test public final void testSubsequentStarts() { leaseCleanupManager.start(); Assert.assertTrue(leaseCleanupManager.isRunning()); leaseCleanupManager.start(); }
public void start() { if (!isRunning) { log.info("Starting lease cleanup thread."); completedLeaseStopwatch.reset().start(); garbageLeaseStopwatch.reset().start(); deletionThreadPool.scheduleAtFixedRate(new LeaseCleanupThread(), INITIAL_DELAY, leaseCleanupIntervalMillis, TimeUnit.MILLISECONDS); isRunning = true; } else { log.info("Lease cleanup thread already running, no need to start."); } }
LeaseCleanupManager { public void start() { if (!isRunning) { log.info("Starting lease cleanup thread."); completedLeaseStopwatch.reset().start(); garbageLeaseStopwatch.reset().start(); deletionThreadPool.scheduleAtFixedRate(new LeaseCleanupThread(), INITIAL_DELAY, leaseCleanupIntervalMillis, TimeUnit.MILLISECONDS); isRunning = true; } else { log.info("Lease cleanup thread already running, no need to start."); } } }
LeaseCleanupManager { public void start() { if (!isRunning) { log.info("Starting lease cleanup thread."); completedLeaseStopwatch.reset().start(); garbageLeaseStopwatch.reset().start(); deletionThreadPool.scheduleAtFixedRate(new LeaseCleanupThread(), INITIAL_DELAY, leaseCleanupIntervalMillis, TimeUnit.MILLISECONDS); isRunning = true; } else { log.info("Lease cleanup thread already running, no need to start."); } }  }
LeaseCleanupManager { public void start() { if (!isRunning) { log.info("Starting lease cleanup thread."); completedLeaseStopwatch.reset().start(); garbageLeaseStopwatch.reset().start(); deletionThreadPool.scheduleAtFixedRate(new LeaseCleanupThread(), INITIAL_DELAY, leaseCleanupIntervalMillis, TimeUnit.MILLISECONDS); isRunning = true; } else { log.info("Lease cleanup thread already running, no need to start."); } }  void start(); void enqueueForDeletion(LeasePendingDeletion leasePendingDeletion); boolean isEnqueuedForDeletion(LeasePendingDeletion leasePendingDeletion); LeaseCleanupResult cleanupLease(LeasePendingDeletion leasePendingDeletion,
            boolean timeToCheckForCompletedShard, boolean timeToCheckForGarbageShard); }
LeaseCleanupManager { public void start() { if (!isRunning) { log.info("Starting lease cleanup thread."); completedLeaseStopwatch.reset().start(); garbageLeaseStopwatch.reset().start(); deletionThreadPool.scheduleAtFixedRate(new LeaseCleanupThread(), INITIAL_DELAY, leaseCleanupIntervalMillis, TimeUnit.MILLISECONDS); isRunning = true; } else { log.info("Lease cleanup thread already running, no need to start."); } }  void start(); void enqueueForDeletion(LeasePendingDeletion leasePendingDeletion); boolean isEnqueuedForDeletion(LeasePendingDeletion leasePendingDeletion); LeaseCleanupResult cleanupLease(LeasePendingDeletion leasePendingDeletion,
            boolean timeToCheckForCompletedShard, boolean timeToCheckForGarbageShard);  }