Codota Logo
LinkedTransferQueue.poll
Code IndexAdd Codota to your IDE (free)

How to use
poll
method
in
jsr166y.LinkedTransferQueue

Best Java code snippets using jsr166y.LinkedTransferQueue.poll (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: h2oai/h2o-2

/**
 * @throws NullPointerException     {@inheritDoc}
 * @throws IllegalArgumentException {@inheritDoc}
 */
public int drainTo(Collection<? super E> c) {
  if (c == null)
    throw new NullPointerException();
  if (c == this)
    throw new IllegalArgumentException();
  int n = 0;
  for (E e; (e = poll()) != null;) {
    c.add(e);
    ++n;
  }
  return n;
}
origin: h2oai/h2o-2

/**
 * @throws NullPointerException     {@inheritDoc}
 * @throws IllegalArgumentException {@inheritDoc}
 */
public int drainTo(Collection<? super E> c, int maxElements) {
  if (c == null)
    throw new NullPointerException();
  if (c == this)
    throw new IllegalArgumentException();
  int n = 0;
  for (E e; n < maxElements && (e = poll()) != null;) {
    c.add(e);
    ++n;
  }
  return n;
}
origin: org.codehaus.jsr166-mirror/jsr166y

/**
 * @throws NullPointerException     {@inheritDoc}
 * @throws IllegalArgumentException {@inheritDoc}
 */
public int drainTo(Collection<? super E> c, int maxElements) {
  if (c == null)
    throw new NullPointerException();
  if (c == this)
    throw new IllegalArgumentException();
  int n = 0;
  E e;
  while (n < maxElements && (e = poll()) != null) {
    c.add(e);
    ++n;
  }
  return n;
}
origin: org.codehaus.jsr166-mirror/jsr166y

/**
 * @throws NullPointerException     {@inheritDoc}
 * @throws IllegalArgumentException {@inheritDoc}
 */
public int drainTo(Collection<? super E> c) {
  if (c == null)
    throw new NullPointerException();
  if (c == this)
    throw new IllegalArgumentException();
  int n = 0;
  E e;
  while ( (e = poll()) != null) {
    c.add(e);
    ++n;
  }
  return n;
}
origin: actiontech/dble

  @Override
  public void run() {
    for (; ; ) {
      // try {
      if (queue.poll() != null) {
        takeCount++;
      }
      // } catch (InterruptedException e) {
      // e.printStackTrace();
      // }
      // try {
      // Thread.sleep(10L);
      // } catch (InterruptedException e) {
      // 
      // e.printStackTrace();
      // }
    }
  }
}.start();
jsr166yLinkedTransferQueuepoll

Popular methods of LinkedTransferQueue

  • offer
    Inserts the specified element at the tail of this queue. As the queue is unbounded, this method will
  • <init>
    Creates a LinkedTransferQueueinitially containing the elements of the given collection, added in tra
  • addAll
  • awaitMatch
    Spins/yields/blocks until node s is matched or caller gives up.
  • casHead
  • casSweepVotes
  • casTail
  • cast
  • countOfMode
    Traverses and counts unmatched nodes of the given mode. Used by methods size and getWaitingConsumerC
  • findAndRemove
    Main implementation of remove(Object)
  • firstDataItem
    Returns the item in the first unmatched node with isData; or null if none. Used by peek.
  • firstOfMode
    Returns the first unmatched node of the given mode, or null if none. Used by methods isEmpty, hasWai
  • firstDataItem,
  • firstOfMode,
  • spinsFor,
  • succ,
  • sweep,
  • tryAppend,
  • unsplice,
  • xfer,
  • clear

Popular in Java

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now