Package com.hazelcast.client

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


    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


        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 {
        IAtomicReference<String> reference = getAtomicReference();
View Full Code Here

    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

        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
    public void contains()throws Exception {
View Full Code Here

    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)));
        assertEquals(Boolean.FALSE, client.receive());
View Full Code Here

        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());

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

        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

        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 {
        IAtomicReference<String> reference = getAtomicReference();
View Full Code Here

        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());
        assertEquals("foo", reference.get());
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());
        assertEquals("foo", reference.get());
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.