congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
LinkedTransferQueue.offer
Code IndexAdd Tabnine to your IDE (free)

How to use
offer
method
in
jsr166y.LinkedTransferQueue

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

origin: h2oai/h2o-2

/**
 * Reconstitutes the Queue instance from a stream (that is,
 * deserializes it).
 *
 * @param s the stream
 */
private void readObject(java.io.ObjectInputStream s)
  throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  for (;;) {
    @SuppressWarnings("unchecked")
    E item = (E) s.readObject();
    if (item == null)
      break;
    else
      offer(item);
  }
}
origin: org.codehaus.jsr166-mirror/jsr166y

/**
 * Reconstitutes the Queue instance from a stream (that is,
 * deserializes it).
 *
 * @param s the stream
 */
private void readObject(java.io.ObjectInputStream s)
  throws java.io.IOException, ClassNotFoundException {
  s.defaultReadObject();
  for (;;) {
    @SuppressWarnings("unchecked") E item = (E) s.readObject();
    if (item == null)
      break;
    else
      offer(item);
  }
}
origin: actiontech/dble

  @Override
  public void run() {
    for (; ; ) {
      if (queue.offer("A")) {
        putCount++;
      }
    }
  }
}.start();
origin: actiontech/dble

  @Override
  public void run() {
    while (true) {
      transferQueue.offer(testData);
    }
  }
}.start();
jsr166yLinkedTransferQueueoffer

Javadoc

Inserts the specified element at the tail of this queue. As the queue is unbounded, this method will never return false.

Popular methods of LinkedTransferQueue

  • 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.
  • 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

  • Making http requests using okhttp
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Path (java.nio.file)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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