Package com.hazelcast.queue.impl.client

Examples of com.hazelcast.queue.impl.client.CompareAndRemoveRequest


        Boolean result = invoke(request);
        return result;
    }

    public boolean removeAll(Collection<?> c) {
        CompareAndRemoveRequest request = new CompareAndRemoveRequest(name, getDataList(c), false);
        Boolean result = invoke(request);
        return result;
    }
View Full Code Here


        Boolean result = invoke(request);
        return result;
    }

    public boolean retainAll(Collection<?> c) {
        CompareAndRemoveRequest request = new CompareAndRemoveRequest(name, getDataList(c), true);
        Boolean result = invoke(request);
        return result;
    }
View Full Code Here

            }
        };
        constructors[COMPARE_AND_REMOVE] = new ConstructorFunction<Integer, Portable>() {
            @Override
            public Portable createNew(Integer arg) {
                return new CompareAndRemoveRequest();
            }
        };
        constructors[CLEAR] = new ConstructorFunction<Integer, Portable>() {
            @Override
            public Portable createNew(Integer arg) {
View Full Code Here

        List<Data> list = new ArrayList<Data>();
        list.add(ss.toData("item1"));
        list.add(ss.toData("item2"));

        final SimpleClient client = getClient();
        client.send(new CompareAndRemoveRequest(queueName, list, true));
        Boolean result = (Boolean) client.receive();
        assertTrue(result);
        assertEquals(2, q.size());

        client.send(new CompareAndRemoveRequest(queueName, list, false));
        result = (Boolean) client.receive();
        assertTrue(result);
        assertEquals(0, q.size());
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.queue.impl.client.CompareAndRemoveRequest

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.