Package com.hazelcast.core

Examples of com.hazelcast.core.MultiMap.unlock()


    @Test(expected = NullPointerException.class)
    public void testUnlock_whenNullKey() {
        TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(1);
        MultiMap multiMap = getMultiMap(factory.newInstances(), randomString());

        multiMap.unlock(null);
    }

    @Test(expected = NullPointerException.class)
    public void testContainsKey_whenNullKey() throws InterruptedException {
        TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(1);
View Full Code Here


    }

    @Test(expected = NullPointerException.class)
    public void testUnLock_whenNullKey() throws Exception {
        final MultiMap mm = client.getMultiMap(randomString());
        mm.unlock(null);
    }

    @Test(expected = IllegalMonitorStateException.class)
    public void testUnlock_whenNotLocked() throws Exception {
        final MultiMap mm = client.getMultiMap(randomString());
View Full Code Here

    }

    @Test(expected = IllegalMonitorStateException.class)
    public void testUnlock_whenNotLocked() throws Exception {
        final MultiMap mm = client.getMultiMap(randomString());
        mm.unlock("NOT_LOCKED");
    }

    @Test
    public void testUnLock() throws Exception {
        final MultiMap mm = client.getMultiMap(randomString());
View Full Code Here

    public void testUnLock() throws Exception {
        final MultiMap mm = client.getMultiMap(randomString());
        final Object key = "key";

        mm.lock(key);
        mm.unlock(key);
        assertFalse(mm.isLocked(key));
    }

    @Test
    public void testUnlock_whenRentrantlyLockedBySelf() throws Exception {
View Full Code Here

        final MultiMap mm = client.getMultiMap(randomString());
        final Object key = "key";

        mm.lock(key);
        mm.lock(key);
        mm.unlock(key);
        assertTrue(mm.isLocked(key));
    }

    @Test(expected = IllegalMonitorStateException.class)
    public void testUnlock_whenLockedByOther() throws Exception {
View Full Code Here

                    e.printStackTrace();
                }
            }
        }.start();

        mm.unlock(key);

        assertOpenEventually(tryLockReturnsTrue);
        assertTrue(mm.isLocked(key));
    }
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.