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

x33g5p2x  于2022-01-29 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(115)

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

ThreadPoolExecutor.terminated介绍

[英]Method invoked when the Executor has terminated. Default implementation does nothing. Note: To properly nest multiple overridings, subclasses should generally invoke super.terminated within this method.
[中]当执行器终止时调用的方法。默认实现什么都不做。注意:为了正确嵌套多个重写,子类通常应该调用super。在这个方法中终止。

代码示例

代码示例来源:origin: apache/geode

@Override
protected void terminated() {
 if (this.bufferConsumer != null) {
  this.bufferConsumer.interrupt();
 }
 super.terminated();
}

代码示例来源:origin: apache/geode

@Override
protected void terminated() {
 if (this.bufferConsumer != null) {
  this.bufferConsumer.interrupt();
 }
 super.terminated();
}

代码示例来源:origin: io.netty/netty

@Override
protected void terminated() {
  super.terminated();
  misuseDetector.decrease();
}

代码示例来源:origin: robovm/robovm

if (ctl.compareAndSet(c, ctlOf(TIDYING, 0))) {
  try {
    terminated();
  } finally {
    ctl.set(ctlOf(TERMINATED, 0));

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

@Override
protected synchronized void terminated() {
  super.terminated();
  synchronized (monitor) {
    if (listener != null) {
      try {
        listener.onTerminated();
      } finally {
        listener = null;
      }
    }
  }
}

代码示例来源:origin: StannyBing/ZXUtils

@Override
  protected void terminated() {
    super.terminated();
  }
}

代码示例来源:origin: io.snappydata/gemfire-core

@Override
protected void terminated() {
 if (this.bufferConsumer != null) {
  this.bufferConsumer.interrupt();
 }
 super.terminated();
}

代码示例来源:origin: com.crawljax/crawljax

@Override
protected void terminated() {
  super.terminated();
  synchronized (this) {
    // Send a notify to the wait function in waitForTermination
    notifyAll();
  }
}

代码示例来源:origin: org.apache.geode/gemfire-core

@Override
protected void terminated() {
 if (this.bufferConsumer != null) {
  this.bufferConsumer.interrupt();
 }
 super.terminated();
}

代码示例来源:origin: org.apache.geode/gemfire-core

@Override
protected void terminated() {
 if (this.bufferConsumer != null) {
  this.bufferConsumer.interrupt();
 }
 super.terminated();
}

代码示例来源:origin: io.snappydata/gemfire-core

@Override
protected void terminated() {
 if (this.bufferConsumer != null) {
  this.bufferConsumer.interrupt();
 }
 super.terminated();
}

代码示例来源:origin: marklogic/java-client-api

@Override
 protected void terminated() {
  super.terminated();
  synchronized(objectToNotifyFrom) {
   objectToNotifyFrom.notifyAll();
  }
  synchronized ( lock ) {
   lock.notify();
  }
 }
}

代码示例来源:origin: org.apache.apex/apex-shaded-ning19

@Override
protected void terminated() {
  super.terminated();
  misuseDetector.decrease();
}

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

@Override
protected synchronized void terminated() {
  super.terminated();
  synchronized (monitor) {
    if (listener != null) {
      try {
        listener.onTerminated();
      } finally {
        listener = null;
      }
    }
  }
}

代码示例来源:origin: org.zaproxy/zap

@Override
protected void terminated() {
  super.terminated();
  // Notify with a copy to allow listeners to remove themselves from listening when notified.
  notifyListeners(new ArrayList<>(listeners));
}

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

@Override
protected void terminated() {
  super.terminated();
  misuseDetector.decrease();
}

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

@Override
protected synchronized void terminated() {
  super.terminated();
  synchronized (monitor) {
    if (listener != null) {
      try {
        listener.onTerminated();
      } finally {
        listener = null;
      }
    }
  }
}

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

@Override
protected synchronized void terminated() {
  super.terminated();
  synchronized (monitor) {
    if (listener != null) {
      try {
        listener.onTerminated();
      } finally {
        listener = null;
      }
    }
  }
}

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

@Override
protected synchronized void terminated() {
  super.terminated();
  synchronized (monitor) {
    if (listener != null) {
      try {
        listener.onTerminated();
      } finally {
        listener = null;
      }
    }
  }
}

代码示例来源:origin: com.brienwheeler.lib/lib-concurrent

@Override
protected void terminated()
{
  log.info("stopped " + ((NamedThreadFactory) getThreadFactory()).getName());
  super.terminated();
}

相关文章

ThreadPoolExecutor类方法