Examples of DistributedLockException


Examples of com.deftlabs.lock.mongo.DistributedLockException

    public void destroy(final DistributedLock pLock) {
        try {
            _lock.lock();

            if (!_locks.containsKey(pLock.getName()))
            { throw new DistributedLockException("Lock has already been destroyed: " + pLock.getName()); }

            // Make sure the lock isn't locked.
            if (pLock.isLocked())
            { throw new IllegalStateException("Lock is currently in use - must unlock before destroying"); }
View Full Code Here

Examples of com.deftlabs.lock.mongo.DistributedLockException

            _lockUnlocked = new Monitor.LockUnlocked(_mongo, _options, _locks);
            (new Thread(_lockUnlocked)).start();


        } catch (final Throwable t) { throw new DistributedLockException(t);
        } finally { _lock.unlock(); }
    }
View Full Code Here

Examples of com.deftlabs.lock.mongo.DistributedLockException

            _lockTimeout.stopRunning();
            _lockHeartbeat.stopRunning();
            _lockUnlocked.stopRunning();

        } catch (final Throwable t) { throw new DistributedLockException(t);
        } finally { _lock.unlock(); }
    }
View Full Code Here

Examples of com.deftlabs.lock.mongo.DistributedLockException

    public void destroy(final DistributedLock pLock) {
        try {
            _lock.lock();

            if (!_locks.containsKey(pLock.getName()))
            { throw new DistributedLockException("Lock has already been destroyed: " + pLock.getName()); }

            // Make sure the lock isn't locked.
            if (pLock.isLocked())
            { throw new IllegalStateException("Lock is currently in use - must unlock before destroying"); }
View Full Code Here

Examples of com.deftlabs.lock.mongo.DistributedLockException

            _lockTimeout = new Monitor.LockTimeout(_mongo, _options);
            (new Thread(_lockTimeout)).start();


        } catch (final Throwable t) { throw new DistributedLockException(t);
        } finally { _lock.unlock(); }
    }
View Full Code Here

Examples of com.deftlabs.lock.mongo.DistributedLockException

            }

            _lockTimeout.stopRunning();
            _lockHeartbeat.stopRunning();

        } catch (final Throwable t) { throw new DistributedLockException(t);
        } finally { _lock.unlock(); }
    }
View Full Code Here

Examples of com.deftlabs.lock.mongo.DistributedLockException

    @Override
    public void destroy(final DistributedLock pLock) {
        _lock.lock();
        try {
            if (!_locks.containsKey(pLock.getName()))
            { throw new DistributedLockException("Lock has already been destroyed: " + pLock.getName()); }

            // Make sure the lock isn't locked.
            if (pLock.isLocked())
            { throw new IllegalStateException("Lock is currently in use - must unlock before destroying"); }
View Full Code Here

Examples of com.deftlabs.lock.mongo.DistributedLockException

            _lockUnlocked = new Monitor.LockUnlocked(_mongo, _options, _locks);
            _lockUnlocked.start();


        } catch (final Throwable t) { throw new DistributedLockException(t);
        } finally { _lock.unlock(); }
    }
View Full Code Here

Examples of com.deftlabs.lock.mongo.DistributedLockException

            _lockHeartbeat.shutdown();
            _lockUnlocked.shutdown();

            _locks.clear();
            _mongo.close();
        } catch (final Throwable t) { throw new DistributedLockException(t);
        } finally { _lock.unlock(); }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.