java.util.concurrent.CyclicBarrier.isBroken()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中java.util.concurrent.CyclicBarrier.isBroken()方法的一些代码示例,展示了CyclicBarrier.isBroken()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CyclicBarrier.isBroken()方法的具体详情如下:
包路径:java.util.concurrent.CyclicBarrier
类名称:CyclicBarrier
方法名:isBroken

CyclicBarrier.isBroken介绍

[英]Queries if this barrier is in a broken state.
[中]查询此屏障是否处于断开状态。

代码示例

代码示例来源:origin: org.elasticsearch/elasticsearch

/**
 * Queries if this barrier is in a broken state. Note that if
 * {@link #reset(Exception)} is invoked the barrier will remain broken, while
 * {@link #reset()} will reset the barrier to its initial state and
 * {@link #isBroken()} will return false.
 *
 * @return {@code true} if one or more parties broke out of this barrier due
 *         to interruption or timeout since construction or the last reset,
 *         or a barrier action failed due to an exception; {@code false}
 *         otherwise.
 * @see #inspect()
 */
@Override
public synchronized boolean isBroken() {
  return this.cause != null || super.isBroken();
}

代码示例来源:origin: org.drools/drools-compiler

if (!barrier.isBroken()) {
  barrier.await();
} else {

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

/**
 * Queries if this barrier is in a broken state. Note that if
 * {@link #reset(Exception)} is invoked the barrier will remain broken, while
 * {@link #reset()} will reset the barrier to its initial state and
 * {@link #isBroken()} will return false.
 *
 * @return {@code true} if one or more parties broke out of this barrier due
 *         to interruption or timeout since construction or the last reset,
 *         or a barrier action failed due to an exception; {@code false}
 *         otherwise.
 * @see #inspect()
 */
@Override
public synchronized boolean isBroken() {
  return this.cause != null || super.isBroken();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

/**
 * Queries if this barrier is in a broken state. Note that if
 * {@link #reset(Exception)} is invoked the barrier will remain broken, while
 * {@link #reset()} will reset the barrier to its initial state and
 * {@link #isBroken()} will return false.
 *
 * @return {@code true} if one or more parties broke out of this barrier due
 *         to interruption or timeout since construction or the last reset,
 *         or a barrier action failed due to an exception; {@code false}
 *         otherwise.
 * @see #inspect()
 */
@Override
public synchronized boolean isBroken() {
  return this.cause != null || super.isBroken();
}

代码示例来源:origin: apache/servicemix-bundles

/**
 * Queries if this barrier is in a broken state. Note that if
 * {@link #reset(Exception)} is invoked the barrier will remain broken, while
 * {@link #reset()} will reset the barrier to its initial state and
 * {@link #isBroken()} will return false.
 *
 * @return {@code true} if one or more parties broke out of this barrier due
 *         to interruption or timeout since construction or the last reset,
 *         or a barrier action failed due to an exception; {@code false}
 *         otherwise.
 * @see #inspect()
 */
@Override
public synchronized boolean isBroken() {
  return this.cause != null || super.isBroken();
}

代码示例来源:origin: harbby/presto-connectors

/**
 * Queries if this barrier is in a broken state. Note that if
 * {@link #reset(Throwable)} is invoked the barrier will remain broken, while
 * {@link #reset()} will reset the barrier to its initial state and
 * {@link #isBroken()} will return false.
 *
 * @return {@code true} if one or more parties broke out of this barrier due
 *         to interruption or timeout since construction or the last reset,
 *         or a barrier action failed due to an exception; {@code false}
 *         otherwise.
 * @see #inspect()
 */
@Override
public synchronized boolean isBroken() {
  return this.cause != null || super.isBroken();
}

代码示例来源:origin: blazegraph/database

private void logErrorAndResetBarrier(final Throwable ex) {
  log.error(ex, ex);
  if (!barrier.isBroken()) {
    log.error("Forcing barrier break");
    barrier.reset();
    
  }
}

代码示例来源:origin: com.blazegraph/bigdata-core

private void logErrorAndResetBarrier(final Throwable ex) {
  log.error(ex, ex);
  if (!barrier.isBroken()) {
    log.error("Forcing barrier break");
    barrier.reset();
    
  }
}

代码示例来源:origin: stackoverflow.com

if(barrier.isBroken()) {
  System.out.println("Barrier broken ");

代码示例来源:origin: org.integratedmodelling/klab-engine

ok = !mBarrier.isBroken();
} else {

代码示例来源:origin: blazegraph/database

assert !barrier.isBroken();

代码示例来源:origin: org.infinispan/infinispan-core

try {
 for (int moveToIndex = threadIndex;
    moveToIndex < validMoves.length && !barrier.isBroken() && !failed.get() && !quit.get();
    moveToIndex += threads) {
   operation.beforeOperation(caches.get(0));

相关文章