@Test public void acquireLockRetries() { when(mockPls.acquireBackupLock(anyString())) .thenThrow(mock(CheckAndSetException.class)) .thenReturn(mockLockId); manager.acquirePersistentLockWithRetry(); verify(mockPls, times(2)).acquireBackupLock("Sweep"); }
public void acquirePersistentLockWithRetry() { while (!tryAcquirePersistentLock()) { waitForRetry(); } }
PersistentLockManager implements AutoCloseable { public void acquirePersistentLockWithRetry() { while (!tryAcquirePersistentLock()) { waitForRetry(); } } }
PersistentLockManager implements AutoCloseable { public void acquirePersistentLockWithRetry() { while (!tryAcquirePersistentLock()) { waitForRetry(); } } PersistentLockManager(MetricsManager metricsManager,
            PersistentLockService persistentLockService, long persistentLockRetryWaitMillis); }
PersistentLockManager implements AutoCloseable { public void acquirePersistentLockWithRetry() { while (!tryAcquirePersistentLock()) { waitForRetry(); } } PersistentLockManager(MetricsManager metricsManager,
            PersistentLockService persistentLockService, long persistentLockRetryWaitMillis); @Override void close(); synchronized void shutdown(); void acquirePersistentLockWithRetry(); synchronized void releasePersistentLock(); }
PersistentLockManager implements AutoCloseable { public void acquirePersistentLockWithRetry() { while (!tryAcquirePersistentLock()) { waitForRetry(); } } PersistentLockManager(MetricsManager metricsManager,
            PersistentLockService persistentLockService, long persistentLockRetryWaitMillis); @Override void close(); synchronized void shutdown(); void acquirePersistentLockWithRetry(); synchronized void releasePersistentLock();  }