Tabnine Logo
Phaser$QNode.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
java.util.concurrent.Phaser$QNode
constructor

Best Java code snippets using java.util.concurrent.Phaser$QNode.<init> (Showing top 20 results out of 315)

origin: robovm/robovm

  return phase;
if (p == phase) {
  QNode node = new QNode(this, phase, true, true, nanos);
  p = root.internalAwaitAdvance(phase, node);
  if (node.wasInterrupted)
origin: robovm/robovm

boolean interrupted = Thread.interrupted();
if (interrupted || --spins < 0) { // need node to record intr
  node = new QNode(this, phase, false, false, 0L);
  node.wasInterrupted = interrupted;
origin: robovm/robovm

/**
 * Awaits the phase of this phaser to advance from the given phase
 * value, throwing {@code InterruptedException} if interrupted
 * while waiting, or returning immediately if the current phase is
 * not equal to the given phase value or this phaser is
 * terminated.
 *
 * @param phase an arrival phase number, or negative value if
 * terminated; this argument is normally the value returned by a
 * previous call to {@code arrive} or {@code arriveAndDeregister}.
 * @return the next arrival phase number, or the argument if it is
 * negative, or the (negative) {@linkplain #getPhase() current phase}
 * if terminated
 * @throws InterruptedException if thread interrupted while waiting
 */
public int awaitAdvanceInterruptibly(int phase)
  throws InterruptedException {
  final Phaser root = this.root;
  long s = (root == this) ? state : reconcileState();
  int p = (int)(s >>> PHASE_SHIFT);
  if (phase < 0)
    return phase;
  if (p == phase) {
    QNode node = new QNode(this, phase, true, false, 0L);
    p = root.internalAwaitAdvance(phase, node);
    if (node.wasInterrupted)
      throw new InterruptedException();
  }
  return p;
}
origin: jtulach/bck2brwsr

  return phase;
if (p == phase) {
  QNode node = new QNode(this, phase, true, true, nanos);
  p = root.internalAwaitAdvance(phase, node);
  if (node.wasInterrupted)
origin: org.codehaus.jsr166-mirror/jsr166

  return phase;
if (p == phase) {
  QNode node = new QNode(this, phase, true, true, nanos);
  p = root.internalAwaitAdvance(phase, node);
  if (node.wasInterrupted)
origin: com.bugvm/bugvm-rt

  return phase;
if (p == phase) {
  QNode node = new QNode(this, phase, true, true, nanos);
  p = root.internalAwaitAdvance(phase, node);
  if (node.wasInterrupted)
origin: com.gluonhq/robovm-rt

  return phase;
if (p == phase) {
  QNode node = new QNode(this, phase, true, true, nanos);
  p = root.internalAwaitAdvance(phase, node);
  if (node.wasInterrupted)
origin: ibinti/bugvm

  return phase;
if (p == phase) {
  QNode node = new QNode(this, phase, true, true, nanos);
  p = root.internalAwaitAdvance(phase, node);
  if (node.wasInterrupted)
origin: org.apidesign.bck2brwsr/emul

  return phase;
if (p == phase) {
  QNode node = new QNode(this, phase, true, true, nanos);
  p = root.internalAwaitAdvance(phase, node);
  if (node.wasInterrupted)
origin: com.mobidevelop.robovm/robovm-rt

  return phase;
if (p == phase) {
  QNode node = new QNode(this, phase, true, true, nanos);
  p = root.internalAwaitAdvance(phase, node);
  if (node.wasInterrupted)
origin: FlexoVM/flexovm

/**
 * Awaits the phase of this phaser to advance from the given phase
 * value, throwing {@code InterruptedException} if interrupted
 * while waiting, or returning immediately if the current phase is
 * not equal to the given phase value or this phaser is
 * terminated.
 *
 * @param phase an arrival phase number, or negative value if
 * terminated; this argument is normally the value returned by a
 * previous call to {@code arrive} or {@code arriveAndDeregister}.
 * @return the next arrival phase number, or the argument if it is
 * negative, or the (negative) {@linkplain #getPhase() current phase}
 * if terminated
 * @throws InterruptedException if thread interrupted while waiting
 */
public int awaitAdvanceInterruptibly(int phase)
  throws InterruptedException {
  final Phaser root = this.root;
  long s = (root == this) ? state : reconcileState();
  int p = (int)(s >>> PHASE_SHIFT);
  if (phase < 0)
    return phase;
  if (p == phase) {
    QNode node = new QNode(this, phase, true, false, 0L);
    p = root.internalAwaitAdvance(phase, node);
    if (node.wasInterrupted)
      throw new InterruptedException();
  }
  return p;
}
origin: jtulach/bck2brwsr

/**
 * Awaits the phase of this phaser to advance from the given phase
 * value, throwing {@code InterruptedException} if interrupted
 * while waiting, or returning immediately if the current phase is
 * not equal to the given phase value or this phaser is
 * terminated.
 *
 * @param phase an arrival phase number, or negative value if
 * terminated; this argument is normally the value returned by a
 * previous call to {@code arrive} or {@code arriveAndDeregister}.
 * @return the next arrival phase number, or the argument if it is
 * negative, or the (negative) {@linkplain #getPhase() current phase}
 * if terminated
 * @throws InterruptedException if thread interrupted while waiting
 */
public int awaitAdvanceInterruptibly(int phase)
  throws InterruptedException {
  final Phaser root = this.root;
  long s = (root == this) ? state : reconcileState();
  int p = (int)(s >>> PHASE_SHIFT);
  if (phase < 0)
    return phase;
  if (p == phase) {
    QNode node = new QNode(this, phase, true, false, 0L);
    p = root.internalAwaitAdvance(phase, node);
    if (node.wasInterrupted)
      throw new InterruptedException();
  }
  return p;
}
origin: MobiVM/robovm

  return phase;
if (p == phase) {
  QNode node = new QNode(this, phase, true, true, nanos);
  p = root.internalAwaitAdvance(phase, node);
  if (node.wasInterrupted)
origin: org.apidesign.bck2brwsr/emul

/**
 * Awaits the phase of this phaser to advance from the given phase
 * value, throwing {@code InterruptedException} if interrupted
 * while waiting, or returning immediately if the current phase is
 * not equal to the given phase value or this phaser is
 * terminated.
 *
 * @param phase an arrival phase number, or negative value if
 * terminated; this argument is normally the value returned by a
 * previous call to {@code arrive} or {@code arriveAndDeregister}.
 * @return the next arrival phase number, or the argument if it is
 * negative, or the (negative) {@linkplain #getPhase() current phase}
 * if terminated
 * @throws InterruptedException if thread interrupted while waiting
 */
public int awaitAdvanceInterruptibly(int phase)
  throws InterruptedException {
  final Phaser root = this.root;
  long s = (root == this) ? state : reconcileState();
  int p = (int)(s >>> PHASE_SHIFT);
  if (phase < 0)
    return phase;
  if (p == phase) {
    QNode node = new QNode(this, phase, true, false, 0L);
    p = root.internalAwaitAdvance(phase, node);
    if (node.wasInterrupted)
      throw new InterruptedException();
  }
  return p;
}
origin: com.gluonhq/robovm-rt

/**
 * Awaits the phase of this phaser to advance from the given phase
 * value, throwing {@code InterruptedException} if interrupted
 * while waiting, or returning immediately if the current phase is
 * not equal to the given phase value or this phaser is
 * terminated.
 *
 * @param phase an arrival phase number, or negative value if
 * terminated; this argument is normally the value returned by a
 * previous call to {@code arrive} or {@code arriveAndDeregister}.
 * @return the next arrival phase number, or the argument if it is
 * negative, or the (negative) {@linkplain #getPhase() current phase}
 * if terminated
 * @throws InterruptedException if thread interrupted while waiting
 */
public int awaitAdvanceInterruptibly(int phase)
  throws InterruptedException {
  final Phaser root = this.root;
  long s = (root == this) ? state : reconcileState();
  int p = (int)(s >>> PHASE_SHIFT);
  if (phase < 0)
    return phase;
  if (p == phase) {
    QNode node = new QNode(this, phase, true, false, 0L);
    p = root.internalAwaitAdvance(phase, node);
    if (node.wasInterrupted)
      throw new InterruptedException();
  }
  return p;
}
origin: org.codehaus.jsr166-mirror/jsr166

/**
 * Awaits the phase of this phaser to advance from the given phase
 * value, throwing {@code InterruptedException} if interrupted
 * while waiting, or returning immediately if the current phase is
 * not equal to the given phase value or this phaser is
 * terminated.
 *
 * @param phase an arrival phase number, or negative value if
 * terminated; this argument is normally the value returned by a
 * previous call to {@code arrive} or {@code arriveAndDeregister}.
 * @return the next arrival phase number, or the argument if it is
 * negative, or the (negative) {@linkplain #getPhase() current phase}
 * if terminated
 * @throws InterruptedException if thread interrupted while waiting
 */
public int awaitAdvanceInterruptibly(int phase)
  throws InterruptedException {
  final Phaser root = this.root;
  long s = (root == this) ? state : reconcileState();
  int p = (int)(s >>> PHASE_SHIFT);
  if (phase < 0)
    return phase;
  if (p == phase) {
    QNode node = new QNode(this, phase, true, false, 0L);
    p = root.internalAwaitAdvance(phase, node);
    if (node.wasInterrupted)
      throw new InterruptedException();
  }
  return p;
}
origin: com.bugvm/bugvm-rt

/**
 * Awaits the phase of this phaser to advance from the given phase
 * value, throwing {@code InterruptedException} if interrupted
 * while waiting, or returning immediately if the current phase is
 * not equal to the given phase value or this phaser is
 * terminated.
 *
 * @param phase an arrival phase number, or negative value if
 * terminated; this argument is normally the value returned by a
 * previous call to {@code arrive} or {@code arriveAndDeregister}.
 * @return the next arrival phase number, or the argument if it is
 * negative, or the (negative) {@linkplain #getPhase() current phase}
 * if terminated
 * @throws InterruptedException if thread interrupted while waiting
 */
public int awaitAdvanceInterruptibly(int phase)
  throws InterruptedException {
  final Phaser root = this.root;
  long s = (root == this) ? state : reconcileState();
  int p = (int)(s >>> PHASE_SHIFT);
  if (phase < 0)
    return phase;
  if (p == phase) {
    QNode node = new QNode(this, phase, true, false, 0L);
    p = root.internalAwaitAdvance(phase, node);
    if (node.wasInterrupted)
      throw new InterruptedException();
  }
  return p;
}
origin: ibinti/bugvm

/**
 * Awaits the phase of this phaser to advance from the given phase
 * value, throwing {@code InterruptedException} if interrupted
 * while waiting, or returning immediately if the current phase is
 * not equal to the given phase value or this phaser is
 * terminated.
 *
 * @param phase an arrival phase number, or negative value if
 * terminated; this argument is normally the value returned by a
 * previous call to {@code arrive} or {@code arriveAndDeregister}.
 * @return the next arrival phase number, or the argument if it is
 * negative, or the (negative) {@linkplain #getPhase() current phase}
 * if terminated
 * @throws InterruptedException if thread interrupted while waiting
 */
public int awaitAdvanceInterruptibly(int phase)
  throws InterruptedException {
  final Phaser root = this.root;
  long s = (root == this) ? state : reconcileState();
  int p = (int)(s >>> PHASE_SHIFT);
  if (phase < 0)
    return phase;
  if (p == phase) {
    QNode node = new QNode(this, phase, true, false, 0L);
    p = root.internalAwaitAdvance(phase, node);
    if (node.wasInterrupted)
      throw new InterruptedException();
  }
  return p;
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * Awaits the phase of this phaser to advance from the given phase
 * value, throwing {@code InterruptedException} if interrupted
 * while waiting, or returning immediately if the current phase is
 * not equal to the given phase value or this phaser is
 * terminated.
 *
 * @param phase an arrival phase number, or negative value if
 * terminated; this argument is normally the value returned by a
 * previous call to {@code arrive} or {@code arriveAndDeregister}.
 * @return the next arrival phase number, or the argument if it is
 * negative, or the (negative) {@linkplain #getPhase() current phase}
 * if terminated
 * @throws InterruptedException if thread interrupted while waiting
 */
public int awaitAdvanceInterruptibly(int phase)
  throws InterruptedException {
  final Phaser root = this.root;
  long s = (root == this) ? state : reconcileState();
  int p = (int)(s >>> PHASE_SHIFT);
  if (phase < 0)
    return phase;
  if (p == phase) {
    QNode node = new QNode(this, phase, true, false, 0L);
    p = root.internalAwaitAdvance(phase, node);
    if (node.wasInterrupted)
      throw new InterruptedException();
  }
  return p;
}
origin: MobiVM/robovm

/**
 * Awaits the phase of this phaser to advance from the given phase
 * value, throwing {@code InterruptedException} if interrupted
 * while waiting, or returning immediately if the current phase is
 * not equal to the given phase value or this phaser is
 * terminated.
 *
 * @param phase an arrival phase number, or negative value if
 * terminated; this argument is normally the value returned by a
 * previous call to {@code arrive} or {@code arriveAndDeregister}.
 * @return the next arrival phase number, or the argument if it is
 * negative, or the (negative) {@linkplain #getPhase() current phase}
 * if terminated
 * @throws InterruptedException if thread interrupted while waiting
 */
public int awaitAdvanceInterruptibly(int phase)
  throws InterruptedException {
  final Phaser root = this.root;
  long s = (root == this) ? state : reconcileState();
  int p = (int)(s >>> PHASE_SHIFT);
  if (phase < 0)
    return phase;
  if (p == phase) {
    QNode node = new QNode(this, phase, true, false, 0L);
    p = root.internalAwaitAdvance(phase, node);
    if (node.wasInterrupted)
      throw new InterruptedException();
  }
  return p;
}
java.util.concurrentPhaser$QNode<init>

Popular methods of Phaser$QNode

  • isReleasable

Popular in Java

  • Start an intent from android
  • putExtra (Intent)
  • getSupportFragmentManager (FragmentActivity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Path (java.nio.file)
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Best IntelliJ 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