gpt4 book ai didi

com.sun.grizzly.util.WorkerThreadImpl.reset()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 21:57:05 28 4
gpt4 key购买 nike

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

WorkerThreadImpl.reset介绍

暂无

代码示例

代码示例来源:origin: com.sun.grizzly/grizzly-http-utils

@Override
protected void afterExecute(Runnable r, Throwable t) {
  ((WorkerThreadImpl) Thread.currentThread()).reset();
}

代码示例来源:origin: com.sun.grizzly/grizzly-utils

/**
 * Method invoked upon completion of execution of the given Runnable.
 * This method is invoked by the thread that executed the task. If
 * non-null, the Throwable is the uncaught <tt>RuntimeException</tt>
 * or <tt>Error</tt> that caused execution to terminate abruptly.
 *
 * <p><b>Note:</b> When actions are enclosed in tasks (such as
 * {@link java.util.concurrent.FutureTask}) either explicitly or via methods such as
 * <tt>submit</tt>, these task objects catch and maintain
 * computational exceptions, and so they do not cause abrupt
 * termination, and the internal exceptions are <em>not</em>
 * passed to this method.
 *
 * <p>This implementation does nothing, but may be customized in
 * subclasses. Note: To properly nest multiple overridings, subclasses
 * should generally invoke <tt>super.afterExecute</tt> at the
 * beginning of this method.
 *
 * @param thread 
 * @param r the runnable that has completed.
 * @param t the exception that caused termination, or null if
 * execution completed normally.
 */
protected void afterExecute(Thread thread, Runnable r, Throwable t) {
  if (thread instanceof WorkerThreadImpl)
    ((WorkerThreadImpl)thread).reset();
}

代码示例来源:origin: com.sun.grizzly/grizzly-http

@Override
  public void reset() {
    if( streamAlgorithm != null ) {
      Interceptor handler = streamAlgorithm.getHandler();
      if( handler instanceof StaticHandler ) {
        ((StaticHandler) handler).reset();
      }
    }
    super.reset();
  }
}

代码示例来源:origin: org.glassfish.external/grizzly-module

reset();

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com