Codota Logo
AbstractNodeQueue.get
Code IndexAdd Codota to your IDE (free)

How to use
get
method
in
akka.dispatch.AbstractNodeQueue

Best Java code snippets using akka.dispatch.AbstractNodeQueue.get (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: com.typesafe.akka/akka-actor_2.11

/**
 * Query the queue whether it is empty right now.
 * 
 * This method can be used from any thread.
 * 
 * @return true if queue was empty at some point in the past
 */
public final boolean isEmpty() {
  return Unsafe.instance.getObjectVolatile(this, tailOffset) == get();
}
origin: com.typesafe.akka/akka-actor_2.12

/**
 * Query the queue whether it is empty right now.
 * 
 * This method can be used from any thread.
 * 
 * @return true if queue was empty at some point in the past
 */
public final boolean isEmpty() {
  return Unsafe.instance.getObjectVolatile(this, tailOffset) == get();
}
origin: com.typesafe.akka/akka-actor

/**
 * Query the queue whether it is empty right now.
 * 
 * This method can be used from any thread.
 * 
 * @return true if queue was empty at some point in the past
 */
public final boolean isEmpty() {
  return Unsafe.instance.getObjectVolatile(this, tailOffset) == get();
}
origin: com.typesafe.akka/akka-actor_2.10

/**
 * Query the queue tail for the next element without dequeuing it.
 * 
 * Use this method only from the consumer thread!
 * 
 * !!! There is a copy of this code in pollNode() !!!
 * 
 * @return queue node with element inside if there was one, or null if there was none
 */
@SuppressWarnings("unchecked")
protected final Node<T> peekNode() {
  for(;;) {
   final Node<T> tail = ((Node<T>)Unsafe.instance.getObjectVolatile(this, tailOffset));
   final Node<T> next = tail.next();
   if (next != null || get() == tail)
    return next;
  }
}

origin: com.typesafe.akka/akka-actor_2.10

/**
 * This method returns an upper bound on the queue size at the time it
 * starts executing. It may spuriously return smaller values (including
 * zero) if the consumer pulls items out concurrently.
 * 
 * This method can be used from any thread.
 * 
 * @return an upper bound on queue length at some time in the past
 */
@SuppressWarnings("unchecked")
public final int count() {
  int count = 0;
  final Node<T> head = get();
  for(Node<T> n = ((Node<T>) Unsafe.instance.getObjectVolatile(this, tailOffset)).next();
    n != null && count < Integer.MAX_VALUE; 
    n = n.next()) {
   ++count;
   // only iterate up to the point where head was when starting: this is a moving queue!
   if (n == head) break;
  }
  return count;
}
origin: com.typesafe.akka/akka-actor_2.12

/**
 * This method returns an upper bound on the queue size at the time it
 * starts executing. It may spuriously return smaller values (including
 * zero) if the consumer pulls items out concurrently.
 * 
 * This method can be used from any thread.
 * 
 * @return an upper bound on queue length at some time in the past
 */
@SuppressWarnings("unchecked")
public final int count() {
  int count = 0;
  final Node<T> head = get();
  for(Node<T> n = ((Node<T>) Unsafe.instance.getObjectVolatile(this, tailOffset)).next();
    n != null && count < Integer.MAX_VALUE; 
    n = n.next()) {
   ++count;
   // only iterate up to the point where head was when starting: this is a moving queue!
   if (n == head) break;
  }
  return count;
}
origin: com.typesafe.akka/akka-actor_2.11

/**
 * This method returns an upper bound on the queue size at the time it
 * starts executing. It may spuriously return smaller values (including
 * zero) if the consumer pulls items out concurrently.
 * 
 * This method can be used from any thread.
 * 
 * @return an upper bound on queue length at some time in the past
 */
@SuppressWarnings("unchecked")
public final int count() {
  int count = 0;
  final Node<T> head = get();
  for(Node<T> n = ((Node<T>) Unsafe.instance.getObjectVolatile(this, tailOffset)).next();
    n != null && count < Integer.MAX_VALUE; 
    n = n.next()) {
   ++count;
   // only iterate up to the point where head was when starting: this is a moving queue!
   if (n == head) break;
  }
  return count;
}
origin: com.typesafe.akka/akka-actor_2.12

/**
 * Query the queue tail for the next element without dequeuing it.
 * 
 * Use this method only from the consumer thread!
 * 
 * !!! There is a copy of this code in pollNode() !!!
 * 
 * @return queue node with element inside if there was one, or null if there was none
 */
@SuppressWarnings("unchecked")
protected final Node<T> peekNode() {
  final Node<T> tail = ((Node<T>)Unsafe.instance.getObjectVolatile(this, tailOffset));
  Node<T> next = tail.next();
  if (next == null && get() != tail) {
    // if tail != head this is not going to change until producer makes progress
    // we can avoid reading the head and just spin on next until it shows up
    do {
      next = tail.next();
    } while (next == null);
  }
  return next;
}

origin: com.typesafe.akka/akka-actor

/**
 * Query the queue tail for the next element without dequeuing it.
 * 
 * Use this method only from the consumer thread!
 * 
 * !!! There is a copy of this code in pollNode() !!!
 * 
 * @return queue node with element inside if there was one, or null if there was none
 */
@SuppressWarnings("unchecked")
protected final Node<T> peekNode() {
  final Node<T> tail = ((Node<T>)Unsafe.instance.getObjectVolatile(this, tailOffset));
  Node<T> next = tail.next();
  if (next == null && get() != tail) {
    // if tail != head this is not going to change until producer makes progress
    // we can avoid reading the head and just spin on next until it shows up
    do {
      next = tail.next();
    } while (next == null);
  }
  return next;
}

origin: com.typesafe.akka/akka-actor

/**
 * This method returns an upper bound on the queue size at the time it
 * starts executing. It may spuriously return smaller values (including
 * zero) if the consumer pulls items out concurrently.
 * 
 * This method can be used from any thread.
 * 
 * @return an upper bound on queue length at some time in the past
 */
@SuppressWarnings("unchecked")
public final int count() {
  int count = 0;
  final Node<T> head = get();
  for(Node<T> n = ((Node<T>) Unsafe.instance.getObjectVolatile(this, tailOffset)).next();
    n != null && count < Integer.MAX_VALUE; 
    n = n.next()) {
   ++count;
   // only iterate up to the point where head was when starting: this is a moving queue!
   if (n == head) break;
  }
  return count;
}
origin: com.typesafe.akka/akka-actor_2.11

/**
 * Query the queue tail for the next element without dequeuing it.
 * 
 * Use this method only from the consumer thread!
 * 
 * !!! There is a copy of this code in pollNode() !!!
 * 
 * @return queue node with element inside if there was one, or null if there was none
 */
@SuppressWarnings("unchecked")
protected final Node<T> peekNode() {
  final Node<T> tail = ((Node<T>)Unsafe.instance.getObjectVolatile(this, tailOffset));
  Node<T> next = tail.next();
  if (next == null && get() != tail) {
    // if tail != head this is not going to change until producer makes progress
    // we can avoid reading the head and just spin on next until it shows up
    do {
      next = tail.next();
    } while (next == null);
  }
  return next;
}

origin: com.typesafe.akka/akka-actor_2.11

/**
 * Pull one item from the queue, returning it within a queue node.
 * 
 * Use this method only from the consumer thread!
 * 
 * @return queue node with element inside if there was one, or null if there was none
 */
@SuppressWarnings("unchecked")
public final Node<T> pollNode() {
 final Node<T> tail = (Node<T>) Unsafe.instance.getObjectVolatile(this, tailOffset);
 Node<T> next = tail.next();
 if (next == null && get() != tail) {
   // if tail != head this is not going to change until producer makes progress
   // we can avoid reading the head and just spin on next until it shows up
   do {
     next = tail.next();
   } while (next == null);
 }
 if (next == null) return null;
 else {
  tail.value = next.value;
  next.value = null;
  Unsafe.instance.putOrderedObject(this, tailOffset, next);
  tail.setNext(null);
  return tail;
 }
}
origin: com.typesafe.akka/akka-actor

/**
 * Pull one item from the queue, returning it within a queue node.
 * 
 * Use this method only from the consumer thread!
 * 
 * @return queue node with element inside if there was one, or null if there was none
 */
@SuppressWarnings("unchecked")
public final Node<T> pollNode() {
 final Node<T> tail = (Node<T>) Unsafe.instance.getObjectVolatile(this, tailOffset);
 Node<T> next = tail.next();
 if (next == null && get() != tail) {
   // if tail != head this is not going to change until producer makes progress
   // we can avoid reading the head and just spin on next until it shows up
   do {
     next = tail.next();
   } while (next == null);
 }
 if (next == null) return null;
 else {
  tail.value = next.value;
  next.value = null;
  Unsafe.instance.putOrderedObject(this, tailOffset, next);
  tail.setNext(null);
  return tail;
 }
}
origin: com.typesafe.akka/akka-actor_2.12

/**
 * Pull one item from the queue, returning it within a queue node.
 * 
 * Use this method only from the consumer thread!
 * 
 * @return queue node with element inside if there was one, or null if there was none
 */
@SuppressWarnings("unchecked")
public final Node<T> pollNode() {
 final Node<T> tail = (Node<T>) Unsafe.instance.getObjectVolatile(this, tailOffset);
 Node<T> next = tail.next();
 if (next == null && get() != tail) {
   // if tail != head this is not going to change until producer makes progress
   // we can avoid reading the head and just spin on next until it shows up
   do {
     next = tail.next();
   } while (next == null);
 }
 if (next == null) return null;
 else {
  tail.value = next.value;
  next.value = null;
  Unsafe.instance.putOrderedObject(this, tailOffset, next);
  tail.setNext(null);
  return tail;
 }
}
origin: com.typesafe.akka/akka-actor_2.10

/**
 * Pull one item from the queue, returning it within a queue node.
 * 
 * Use this method only from the consumer thread!
 * 
 * @return queue node with element inside if there was one, or null if there was none
 */
@SuppressWarnings("unchecked")
public final Node<T> pollNode() {
 final Node<T> tail = (Node<T>) Unsafe.instance.getObjectVolatile(this, tailOffset);
 Node<T> next = tail.next();
 if (next == null && get() != tail) {
   // if tail != head this is not going to change until producer makes progress
   // we can avoid reading the head and just spin on next until it shows up
   do {
     next = tail.next();
   } while (next == null);
 }
 if (next == null) return null;
 else {
  tail.value = next.value;
  next.value = null;
  Unsafe.instance.putOrderedObject(this, tailOffset, next);
  tail.setNext(null);
  return tail;
 }
}
origin: org.spark-project.akka/akka-actor_2.11

@SuppressWarnings("unchecked")
protected final Node<T> peekNode() {
  for(;;) {
   final Node<T> tail = ((Node<T>)Unsafe.instance.getObjectVolatile(this, tailOffset));
   final Node<T> next = tail.next();
   if (next != null || get() == tail)
    return next;
  }
}
origin: org.spark-project.akka/akka-actor_2.10

@SuppressWarnings("unchecked")
protected final Node<T> peekNode() {
  for(;;) {
   final Node<T> tail = ((Node<T>)Unsafe.instance.getObjectVolatile(this, tailOffset));
   final Node<T> next = tail.next();
   if (next != null || get() == tail)
    return next;
  }
}
origin: com.data-artisans/flakka-actor_2.11

/**
 * Query the queue tail for the next element without dequeuing it.
 * 
 * Use this method only from the consumer thread!
 * 
 * !!! There is a copy of this code in pollNode() !!!
 * 
 * @return queue node with element inside if there was one, or null if there was none
 */
@SuppressWarnings("unchecked")
protected final Node<T> peekNode() {
  for(;;) {
   final Node<T> tail = ((Node<T>)Unsafe.instance.getObjectVolatile(this, tailOffset));
   final Node<T> next = tail.next();
   if (next != null || get() == tail)
    return next;
  }
}

origin: org.spark-project.akka/akka-actor_2.10

@SuppressWarnings("unchecked")
public final Node<T> pollNode() {
 Node<T> tail;
 Node<T> next;
 for(;;) {
  tail = ((Node<T>)Unsafe.instance.getObjectVolatile(this, tailOffset));
  next = tail.next();
  if (next != null || get() == tail)
   break;
 }
 if (next == null) return null;
 else {
  tail.value = next.value;
  next.value = null;
  Unsafe.instance.putOrderedObject(this, tailOffset, next);
  return tail;
 }
}
origin: org.spark-project.akka/akka-actor_2.11

@SuppressWarnings("unchecked")
public final Node<T> pollNode() {
 Node<T> tail;
 Node<T> next;
 for(;;) {
  tail = ((Node<T>)Unsafe.instance.getObjectVolatile(this, tailOffset));
  next = tail.next();
  if (next != null || get() == tail)
   break;
 }
 if (next == null) return null;
 else {
  tail.value = next.value;
  next.value = null;
  Unsafe.instance.putOrderedObject(this, tailOffset, next);
  return tail;
 }
}
akka.dispatchAbstractNodeQueueget

Popular methods of AbstractNodeQueue

  • getAndSet
  • peekNode
    Query the queue tail for the next element without dequeuing it. Use this method only from the consum
  • set
  • pollNode
    Pull one item from the queue, returning it within a queue node. Use this method only from the consum
  • peek
    Query the queue tail for the next element without dequeuing it. Use this method only from the consum

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • getSharedPreferences (Context)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
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