Examples of tryPut()


Examples of com.hazelcast.core.IMap.tryPut()

        final IMap map1 = node1.getMap(MAP_A);
        final IMap map2 = node2.getMap(MAP_A);

        map1.lock(KEY);
        boolean putResult = map2.tryPut(KEY, VAL_2, 2, TimeUnit.SECONDS);

        Assert.assertFalse("the result of try put should be false as the absent key is locked", putResult);
        assertTrueEventually(new AssertTask() {
            public void run() {
                Assert.assertEquals("the key should be absent ", null, map1.get(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.