static class LockUnlocked implements Runnable {
@Override public void run() {
while (_running) {
try {
for (final String lockName : _locks.keySet()) {
final DistributedLock lock = _locks.get(lockName);
if (lock.isLocked()) continue;
// Check to see if this is locked.
if (LockDao.isLocked(_mongo, lockName, _svcOptions)) continue;
// The lock is not locked, wakeup any blocking threads.
lock.wakeupBlocked();
}
Thread.sleep(FREQUENCY);
} catch (final InterruptedException ie) { break;
} catch (final Throwable t) { LOG.log(Level.SEVERE, t.getMessage(), t); }