Package java.util.concurrent.atomic

Examples of java.util.concurrent.atomic.AtomicInteger.notify()


        getJmsConsumer().setMessageListener(new MessageListener() {
            public void onMessage(Message msg) {
                incThroughput();
                recvCount.incrementAndGet();
                synchronized (recvCount) {
                    recvCount.notify();
                }
            }
        });

        try {
View Full Code Here


                        session.createReceiver(queue);
                        connection.start();

                        if (count.incrementAndGet() >= number) {
                            synchronized (count) {
                                count.notify();
                            }
                        }
                    } catch (Exception ex) {
                        ex.printStackTrace();
                    }
View Full Code Here

            @Override
            public void finished(Object result, Object context) {
               
                if (notReady.decrementAndGet() == 0) {
                    synchronized (notReady) {
                        notReady.notify();
                    }
                }
                assertEquals(context0, context);
            }
           
View Full Code Here

            @Override
            public void failed(BabuDBException error, Object context) {
               
                if (notReady.decrementAndGet() == 0) {
                    synchronized (notReady) {
                        notReady.notify();
                    }
                }
                fail("This should not happen.");
            }
        });
View Full Code Here

            @Override
            public void finished(Object result, Object context) {
               
                if (notReady.decrementAndGet() == 0) {
                    synchronized (notReady) {
                        notReady.notify();
                    }
                }
                assertEquals(context1, context);
            }
           
View Full Code Here

            @Override
            public void failed(BabuDBException error, Object context) {
               
                if (notReady.decrementAndGet() == 0) {
                    synchronized (notReady) {
                        notReady.notify();
                    }
                }
                fail("This should not happen.");
            }
        });
View Full Code Here

        test2.insert(ig, context2).registerListener(new DatabaseRequestListener<Object>() {
            @Override
            public void finished(Object result, Object context) {
                if (notReady.decrementAndGet() == 0) {
                    synchronized (notReady) {
                        notReady.notify();
                    }
                }
                assertEquals(context2, context);
            }
           
View Full Code Here

           
            @Override
            public void failed(BabuDBException error, Object context) {
                if (notReady.decrementAndGet() == 0) {
                    synchronized (notReady) {
                        notReady.notify();
                    }
                }
                fail("This should not happen.");
            }
        });
View Full Code Here

            @Override
            public void finished(Object result, Object context) {
               
                if (notReady.decrementAndGet() == 0) {
                    synchronized (notReady) {
                        notReady.notify();
                    }
                }
                assertEquals(context0, context);
            }
           
View Full Code Here

            @Override
            public void finished(Object result, Object context) {
               
                if (notReady.decrementAndGet() == 0) {
                    synchronized (notReady) {
                        notReady.notify();
                    }
                }
                assertEquals(context1, context);
            }
           
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.