Examples of refsAllocated()


Examples of co.paralleluniverse.galaxy.core.RefAllocator.RefAllocationsListener.refsAllocated()

            verify(cluster).allocateRefs(anyInt());

        if (hasServer)
            cache.receive(Message.ALLOCED_REF(Message.ALLOC_REF(Comm.SERVER, DEFAULT_ALLOC_COUNT), 100, 3));
        else
            listener.refsAllocated(100, 3);

        res = put.getResult();

        assertThat((Long) res, is(100L));
View Full Code Here

Examples of co.paralleluniverse.galaxy.core.RefAllocator.RefAllocationsListener.refsAllocated()

        assertThat(res, is(PENDING));

        if (hasServer)
            cache.receive(Message.ALLOCED_REF(Message.ALLOC_REF(Comm.SERVER, DEFAULT_ALLOC_COUNT), 200, 3));
        else
            listener.refsAllocated(200, 3);

        res = put.getResult();

        assertThat((Long) res, is(200L));
View Full Code Here

Examples of co.paralleluniverse.galaxy.core.RefAllocator.RefAllocationsListener.refsAllocated()

            verify(cluster).allocateRefs(anyInt());

        if (hasServer)
            cache.receive(Message.ALLOCED_REF(Message.ALLOC_REF(Comm.SERVER, DEFAULT_ALLOC_COUNT), 100, 3));
        else
            listener.refsAllocated(100, 3);

        assertThat(alloc.getFuture().isDone(), is(false));

        if (hasServer)
            cache.receive(Message.ALLOCED_REF(Message.ALLOC_REF(Comm.SERVER, DEFAULT_ALLOC_COUNT), 200, 30));
View Full Code Here

Examples of co.paralleluniverse.galaxy.core.RefAllocator.RefAllocationsListener.refsAllocated()

        assertThat(alloc.getFuture().isDone(), is(false));

        if (hasServer)
            cache.receive(Message.ALLOCED_REF(Message.ALLOC_REF(Comm.SERVER, DEFAULT_ALLOC_COUNT), 200, 30));
        else
            listener.refsAllocated(200, 30);

        res = alloc.getResult();

        assertThat((Long) res, is(200L));
View Full Code Here

Examples of co.paralleluniverse.galaxy.core.RefAllocator.RefAllocationsListener.refsAllocated()

            verify(cluster, atLeastOnce()).allocateRefs(anyInt());

        if (hasServer)
            cache.receive(Message.ALLOCED_REF(Message.ALLOC_REF(Comm.SERVER, DEFAULT_ALLOC_COUNT), 300, 10));
        else
            listener.refsAllocated(300, 10);

        assertThat(alloc.getFuture().isDone(), is(false));

        if (hasServer)
            cache.receive(Message.ALLOCED_REF(Message.ALLOC_REF(Comm.SERVER, DEFAULT_ALLOC_COUNT), 400, 50));
View Full Code Here

Examples of co.paralleluniverse.galaxy.core.RefAllocator.RefAllocationsListener.refsAllocated()

        assertThat(alloc.getFuture().isDone(), is(false));

        if (hasServer)
            cache.receive(Message.ALLOCED_REF(Message.ALLOC_REF(Comm.SERVER, DEFAULT_ALLOC_COUNT), 400, 50));
        else
            listener.refsAllocated(400, 50);

        res = alloc.getResult();

        assertThat((Long) res, is(400L));
    }
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.