Package com.hazelcast.client

Examples of com.hazelcast.client.SimpleClient.send()


    @Test
    public void get() throws Exception {
        IAtomicReference<String> reference = getAtomicReference();

        final SimpleClient client = getClient();
        client.send(new GetRequest(name));
        assertNull(client.receive());

        reference.set("foo");
        client.send(new GetRequest(name));
        assertEquals("foo",client.receive());
View Full Code Here


        final SimpleClient client = getClient();
        client.send(new GetRequest(name));
        assertNull(client.receive());

        reference.set("foo");
        client.send(new GetRequest(name));
        assertEquals("foo",client.receive());
    }

    @Test
    public void isNull() throws Exception {
View Full Code Here

    @Test
    public void isNull() throws Exception {
        IAtomicReference<String> reference = getAtomicReference();

        final SimpleClient client = getClient();
        client.send(new IsNullRequest(name));
        assertEquals(Boolean.TRUE,client.receive());

        reference.set("foo");
        client.send(new IsNullRequest(name));
        assertEquals(Boolean.FALSE,client.receive());
View Full Code Here

        final SimpleClient client = getClient();
        client.send(new IsNullRequest(name));
        assertEquals(Boolean.TRUE,client.receive());

        reference.set("foo");
        client.send(new IsNullRequest(name));
        assertEquals(Boolean.FALSE,client.receive());
    }

    @Test
    @ClientCompatibleTest
View Full Code Here

    @ClientCompatibleTest
    public void contains()throws Exception {
        IAtomicReference<String> reference = getAtomicReference();
        final SimpleClient client = getClient();

        client.send(new ContainsRequest(name, toData(null)));
        assertEquals(Boolean.TRUE, client.receive());

        reference.set("foo");

        client.send(new ContainsRequest(name, toData(null)));
View Full Code Here

        client.send(new ContainsRequest(name, toData(null)));
        assertEquals(Boolean.TRUE, client.receive());

        reference.set("foo");

        client.send(new ContainsRequest(name, toData(null)));
        assertEquals(Boolean.FALSE, client.receive());

        client.send(new ContainsRequest(name, toData("foo")));
        assertEquals(Boolean.TRUE,client.receive());
View Full Code Here

        reference.set("foo");

        client.send(new ContainsRequest(name, toData(null)));
        assertEquals(Boolean.FALSE, client.receive());

        client.send(new ContainsRequest(name, toData("foo")));
        assertEquals(Boolean.TRUE,client.receive());

        client.send(new ContainsRequest(name, toData("bar")));
        assertEquals(Boolean.FALSE,client.receive());
    }
View Full Code Here

        assertEquals(Boolean.FALSE, client.receive());

        client.send(new ContainsRequest(name, toData("foo")));
        assertEquals(Boolean.TRUE,client.receive());

        client.send(new ContainsRequest(name, toData("bar")));
        assertEquals(Boolean.FALSE,client.receive());
    }

    @Test
    public void set() throws Exception {
View Full Code Here

    public void set() throws Exception {
        IAtomicReference<String> reference = getAtomicReference();

        final SimpleClient client = getClient();

        client.send(new SetRequest(name, toData(null)));
        assertNull(client.receive());
        assertNull(reference.get());

        client.send(new SetRequest(name, toData("foo")));
        assertNull(client.receive());
View Full Code Here

        client.send(new SetRequest(name, toData(null)));
        assertNull(client.receive());
        assertNull(reference.get());

        client.send(new SetRequest(name, toData("foo")));
        assertNull(client.receive());
        assertEquals("foo", reference.get());

        client.send(new SetRequest(name, toData("foo")));
        assertNull(client.receive());
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.