Package com.hazelcast.core

Examples of com.hazelcast.core.ILock.forceUnlock()


    @Test(timeout = 60000)
    public void testForceUnlock_whenLockNotOwned() {
        HazelcastInstance instance = createHazelcastInstance();
        ILock lock = instance.getLock(randomString());

        lock.forceUnlock();

        assertFalse(lock.isLocked());
        assertEquals(0, lock.getLockCount());
    }
View Full Code Here


    public void testForceUnlock_whenOwnedByOtherThread() {
        HazelcastInstance instance = createHazelcastInstance();
        ILock lock = instance.getLock(randomString());
        lock.lock();

        lock.forceUnlock();

        assertFalse(lock.isLocked());
        assertEquals(0, lock.getLockCount());
    }
View Full Code Here

    public void testForceUnlock_whenAcquiredByCurrentThread() {
        HazelcastInstance instance = createHazelcastInstance();
        ILock lock = instance.getLock(randomString());
        lock.lock();

        lock.forceUnlock();

        assertFalse(lock.isLocked());
        assertEquals(0, lock.getLockCount());
    }
View Full Code Here

        HazelcastInstance instance = createHazelcastInstance();
        ILock lock = instance.getLock(randomString());
        lock.lock();
        lock.lock();

        lock.forceUnlock();

        assertFalse(lock.isLocked());
        assertEquals(0, lock.getLockCount());
    }
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.