Package com.hazelcast.core

Examples of com.hazelcast.core.IQueue.offer()


        q.offer(1);
        Thread.sleep(sleep);
        q.destroy();
        q = instance.getQueue(name);
        String id = q.addItemListener(ql, false);
        q.offer(2);
        Thread.sleep(sleep);
        q.removeItemListener(id);
        q.offer(3);
        Thread.sleep(sleep);
        assertEquals(1, qLatch.getCount());
View Full Code Here


        q = instance.getQueue(name);
        String id = q.addItemListener(ql, false);
        q.offer(2);
        Thread.sleep(sleep);
        q.removeItemListener(id);
        q.offer(3);
        Thread.sleep(sleep);
        assertEquals(1, qLatch.getCount());
        qLatch.countDown();
        assertTrue("Remaining:" + qLatch.getCount(), qLatch.await(3, TimeUnit.SECONDS));
        q.destroy();
View Full Code Here

    @Test
    public void issue99TestQueueTakeAndDuringRollback() throws InterruptedException {
        final HazelcastInstance hz = createHazelcastInstance();
        final String name = "issue99TestQueueTakeAndDuringRollback";
        final IQueue q = hz.getQueue(name);
        q.offer("item");

        Thread t1 = new Thread() {
            public void run() {
                final TransactionContext context = hz.newTransactionContext();
                try {
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.