Package com.hazelcast.multimap.impl.client

Examples of com.hazelcast.multimap.impl.client.PutRequest


    @Test
    public void testPut() throws IOException {
        MultiMap<Object, Object> mm = getMultiMap();

        final SimpleClient client = getClient();
        client.send(new PutRequest(name, ss.toData("key1"), ss.toData("value1"), -1, getThreadId()));
        boolean result = (Boolean) client.receive();
        assertTrue(result);
        assertEquals("value1", mm.get("key1").iterator().next());

        client.send(new PutRequest(name, ss.toData("key1"), ss.toData("value1"), -1, getThreadId()));
        result = (Boolean) client.receive();
        assertFalse(result);

        assertEquals(1, mm.size());
View Full Code Here


                return new KeySetRequest();
            }
        };
        constructors[PUT] = new ConstructorFunction<Integer, Portable>() {
            public Portable createNew(Integer arg) {
                return new PutRequest();
            }
        };
        constructors[REMOVE_ALL] = new ConstructorFunction<Integer, Portable>() {
            public Portable createNew(Integer arg) {
                return new RemoveAllRequest();
View Full Code Here

        checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
        checkNotNull(value, NULL_VALUE_IS_NOT_ALLOWED);

        Data keyData = toData(key);
        Data valueData = toData(value);
        PutRequest request = new PutRequest(name, keyData, valueData, -1, ThreadUtil.getThreadId());
        Boolean result = invoke(request, keyData);
        return result;
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.multimap.impl.client.PutRequest

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.