Package com.hazelcast.multimap.impl.client

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


    }

    @Test
    public void testListener() throws IOException {
        final SimpleClient client = getClient();
        client.send(new AddEntryListenerRequest(name, null, true));
        client.receive();

        getMultiMap().put("key1", "value1");

        PortableEntryEvent result = (PortableEntryEvent) client.receive();
View Full Code Here


    }

    @Test
    public void testKeyListener() throws IOException {
        final SimpleClient client = getClient();
        client.send(new AddEntryListenerRequest(name, ss.toData("key2"), true));
        client.receive();

        final MultiMap<Object, Object> multiMap = getMultiMap();
        multiMap.put("key1", "value1");
        multiMap.put("key2", "value8");
View Full Code Here

                return new ValuesRequest();
            }
        };
        constructors[ADD_ENTRY_LISTENER] = new ConstructorFunction<Integer, Portable>() {
            public Portable createNew(Integer arg) {
                return new AddEntryListenerRequest();
            }
        };
        constructors[ENTRY_SET_RESPONSE] = new ConstructorFunction<Integer, Portable>() {
            public Portable createNew(Integer arg) {
                return new PortableEntrySetResponse();
View Full Code Here

        throw new UnsupportedOperationException("Locality for client is ambiguous");
    }

    public String addEntryListener(EntryListener<K, V> listener, boolean includeValue) {
        isNotNull(listener, "listener");
        AddEntryListenerRequest request = new AddEntryListenerRequest(name, null, includeValue);
        EventHandler<PortableEntryEvent> handler = createHandler(listener, includeValue);
        return listen(request, handler);
    }
View Full Code Here

        return stopListening(request, registrationId);
    }

    public String addEntryListener(EntryListener<K, V> listener, K key, boolean includeValue) {
        final Data keyData = toData(key);
        AddEntryListenerRequest request = new AddEntryListenerRequest(name, keyData, includeValue);
        EventHandler<PortableEntryEvent> handler = createHandler(listener, includeValue);
        return listen(request, keyData, handler);
    }
View Full Code Here

TOP

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

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.