congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
LinkedTransferQueue.unsplice
Code IndexAdd Tabnine to your IDE (free)

How to use
unsplice
method
in
jsr166y.LinkedTransferQueue

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

origin: h2oai/h2o-2

/**
 * Main implementation of remove(Object)
 */
private boolean findAndRemove(Object e) {
  if (e != null) {
    for (Node pred = null, p = head; p != null; ) {
      Object item = p.item;
      if (p.isData) {
        if (item != null && item != p && e.equals(item) &&
          p.tryMatchData()) {
          unsplice(pred, p);
          return true;
        }
      }
      else if (item == null)
        break;
      pred = p;
      if ((p = p.next) == pred) { // stale
        pred = null;
        p = head;
      }
    }
  }
  return false;
}
origin: h2oai/h2o-2

unsplice(pred, s);
return e;
origin: org.codehaus.jsr166-mirror/jsr166y

/**
 * Main implementation of remove(Object)
 */
private boolean findAndRemove(Object e) {
  if (e != null) {
    for (Node pred = null, p = head; p != null; ) {
      Object item = p.item;
      if (p.isData) {
        if (item != null && item != p && e.equals(item) &&
          p.tryMatchData()) {
          unsplice(pred, p);
          return true;
        }
      }
      else if (item == null)
        break;
      pred = p;
      if ((p = p.next) == pred) { // stale
        pred = null;
        p = head;
      }
    }
  }
  return false;
}
origin: org.codehaus.jsr166-mirror/jsr166y

unsplice(pred, s);
return e;
jsr166yLinkedTransferQueueunsplice

Javadoc

Unsplices (now or later) the given deleted/cancelled node with the given predecessor.

Popular methods of LinkedTransferQueue

  • offer
    Inserts the specified element at the tail of this queue. As the queue is unbounded, this method will
  • poll
  • <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.
  • findAndRemove,
  • firstDataItem,
  • firstOfMode,
  • spinsFor,
  • succ,
  • sweep,
  • tryAppend,
  • xfer,
  • clear

Popular in Java

  • Reactive rest calls using spring rest template
  • getContentResolver (Context)
  • scheduleAtFixedRate (Timer)
  • notifyDataSetChanged (ArrayAdapter)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Option (scala)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now