Package java.util.concurrent

Examples of java.util.concurrent.LinkedBlockingQueue.offer()


            private LinkedBlockingQueue delegate = new LinkedBlockingQueue(EventBusUtils.getQueueSize(subscriberConfig));

            @Override
            @SuppressWarnings("unchecked")
            public boolean offer(Object event) {
                boolean offered = delegate.offer(event);
                if(offered) {
                    queueSizeCounter.incrementAndGet();
                }
                return offered;
            }
View Full Code Here


  public static void pump() {
    assert !SwingUtilities.isEventDispatchThread();
    final BlockingQueue queue = new LinkedBlockingQueue();
    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        queue.offer(queue);
      }
    });
    try {
      queue.take();
    }
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.