Package com.hazelcast.core

Examples of com.hazelcast.core.MultiMap


                        LocalTopicStatsImpl stats = (LocalTopicStatsImpl) topic.getLocalTopicStats();
                        memberState.putLocalTopicStats(topic.getName(), stats);
                        count++;
                    }
                } else if (distributedObject instanceof MultiMap) {
                    MultiMap multiMap = (MultiMap) distributedObject;
                    if (config.findMultiMapConfig(multiMap.getName()).isStatisticsEnabled()) {
                        LocalMultiMapStatsImpl stats = (LocalMultiMapStatsImpl) multiMap.getLocalMultiMapStats();
                        memberState.putLocalMultiMapStats(multiMap.getName(), stats);
                        count++;
                    }
                } else if (distributedObject instanceof IExecutorService) {
                    IExecutorService executorService = (IExecutorService) distributedObject;
                    if (config.findExecutorConfig(executorService.getName()).isStatisticsEnabled()) {
View Full Code Here


        int count = 0;
        final Config config = instance.getConfig();
        for (DistributedObject distributedObject : distributedObjects) {
            if (count < maxVisibleInstanceCount) {
                if (distributedObject instanceof MultiMap) {
                    MultiMap multiMap = (MultiMap) distributedObject;
                    if (config.findMultiMapConfig(multiMap.getName()).isStatisticsEnabled()) {
                        setLongInstanceNames.add("m:" + multiMap.getName());
                        count++;
                    }
                } else if (distributedObject instanceof IMap) {
                    IMap map = (IMap) distributedObject;
                    if (config.findMapConfig(map.getName()).isStatisticsEnabled()) {
View Full Code Here

//
//    }

    @Test
    public void testClear() throws IOException {
        MultiMap mm = getMultiMap();
        mm.put("key1", "value1");
        mm.put("key1", "value2");

        mm.put("key2", "value3");

        final SimpleClient client = getClient();
        client.send(new ClearRequest(name));
        assertNull(client.receive());
        assertEquals(0, mm.size());
    }
View Full Code Here

//        assertFalse(result);
//    }

    @Test
    public void testContainsEntry() throws IOException {
        MultiMap mm = getMultiMap();
        mm.put("key1", "value1");
        mm.put("key2", "value2");
        mm.put("key3", "value3");

        //contains key value
        final SimpleClient client = getClient();
        client.send(new KeyBasedContainsRequest(name, ss.toData("key1"), ss.toData("value1")));
        boolean result = (Boolean) client.receive();
View Full Code Here


    @Test
    public void testContainsKey() {
        TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(1);
        MultiMap multiMap = getMultiMap(factory.newInstances(), randomString());
        System.out.println("test = " + multiMap.containsKey("test"));
        multiMap.put("test","test");
        System.out.println("test = " + multiMap.containsKey("test"));
        multiMap.remove("test");
        System.out.println("test = " + multiMap.containsKey("test"));


    }
View Full Code Here

    }

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

        multiMap.get(null);
    }
View Full Code Here

    }

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

        multiMap.put(null, "someVal");
    }
View Full Code Here

    }

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

        multiMap.put("someVal", null);
    }
View Full Code Here

    }

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

        multiMap.lock(null);
    }
View Full Code Here

    }

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

        multiMap.unlock(null);
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.core.MultiMap

Copyright © 2018 www.massapicom. 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.