Package com.hazelcast.core

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


        map.put(key, "value");
        map.get(key);
        map.remove(key);

        assertFalse(map.containsKey(key));
    }

    @Test
    public void testNearCache_clearFromRemote() {
        final String mapName = randomMapName(NEAR_CACHE_WITH_INVALIDATION);
View Full Code Here


        service.submit(runnable);
        final IMap map = client.getMap(mapName);

        assertTrueEventually(new AssertTask() {
            public void run() throws Exception {
                assertTrue(map.containsKey(member.getUuid()));
            }
        });
    }

    @Test
View Full Code Here

        final IMap map = client.getMap(mapName);

        assertEquals(expectedResult, result.get());
        assertTrueEventually(new AssertTask() {
            public void run() throws Exception {
                assertTrue(map.containsKey(member.getUuid()));
            }
        });
    }

    @Test
View Full Code Here

            }
        });
        IMap map = client.getMap(mapName);

        assertOpenEventually("responseLatch", responseLatch);
        assertTrue(map.containsKey(member.getUuid()));
    }

    @Test
    public void submitCallablePartitionAware() throws Exception {
        IExecutorService service = client.getExecutorService(randomString());
View Full Code Here

        Callable<String> callable = new MapPutPartitionAwareCallable<String, String>(mapName, key);
        Future<String> result = service.submit(callable);

        assertEquals(member.getUuid(), result.get());
        assertTrue(map.containsKey(member.getUuid()));
    }

    @Test
    public void submitCallablePartitionAware_WithExecutionCallback() throws Exception {
        IExecutorService service = client.getExecutorService(randomString());
View Full Code Here

            }
        });

        assertOpenEventually("responseLatch", responseLatch);
        assertEquals(member.getUuid(), result.get());
        assertTrue(map.containsKey(member.getUuid()));
    }
}
View Full Code Here

    }

    @Test
    public void testContainsKey_whenKeyAbsent() {
        final IMap map = client.getMap(randomString());
        assertFalse(map.containsKey("NOT_THERE"));
    }

    @Test(expected = NullPointerException.class)
    public void testContainsKey_whenKeyNull() {
        final IMap map = client.getMap(randomString());
View Full Code Here

    }

    @Test(expected = NullPointerException.class)
    public void testContainsKey_whenKeyNull() {
        final IMap map = client.getMap(randomString());
        map.containsKey(null);
    }

    @Test
    public void testContainsKey_whenKeyPresent() {
        final IMap map = client.getMap(randomString());
View Full Code Here

    @Test
    public void testContainsKey_whenKeyPresent() {
        final IMap map = client.getMap(randomString());
        final Object key = "key";
        map.put(key, "val");
        assertTrue(map.containsKey(key));
    }

    @Test
    public void testContainsValue_whenValueAbsent() {
        final IMap map = client.getMap(randomString());
View Full Code Here

                            stats.increment("get");
                        } else if (operation < 3) {
                            map.remove(key);
                            stats.increment("remove");
                        } else if (operation < 4) {
                            map.containsKey(key);
                            stats.increment("containsKey");
                        } else if (operation < 5) {
                            Object value = String.valueOf(key);
                            map.containsValue(value);
                            stats.increment("containsValue");
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.