@Test @GuardedBy("manager") public void callingAcquireTwiceGivesUsTheSameLock() { whenWeGetTheLockFirstTimeAndThenHoldItForever(); manager.acquirePersistentLockWithRetry(); assertThat(manager.lockId, is(FIRST_LOCK_ID)); manager.acquirePersistentLockWithRetry(); assertThat(manager.lockId, is(FIRST_LOCK_ID)); }
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();  }