org.jboss.threads.JBossExecutors.cleanupExecutor()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(84)

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

JBossExecutors.cleanupExecutor介绍

[英]Create an executor which runs the given cleanup task after running its given task.
[中]创建一个执行器,该执行器在运行给定的清理任务后运行该任务。

代码示例

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

/**
 * Create a direct executor which delegates tasks to the given executor, and then clears <b>all</b> thread-local
 * data after each task completes (regardless of outcome).  You must have the {@link RuntimePermission}{@code ("modifyThread")}
 * permission to use this method.
 *
 * @param delegate the delegate direct executor
 * @return a resetting executor
 * @throws SecurityException if the caller does not have the {@link RuntimePermission}{@code ("modifyThread")} permission
 */
public static DirectExecutor resettingExecutor(final DirectExecutor delegate) throws SecurityException {
  return cleanupExecutor(delegate, threadLocalResetter());
}

代码示例来源:origin: org.jboss.threads/jboss-threads

/**
 * Create a direct executor which delegates tasks to the given executor, and then clears <b>all</b> thread-local
 * data after each task completes (regardless of outcome).  You must have the {@link RuntimePermission}{@code ("modifyThread")}
 * permission to use this method.
 *
 * @param delegate the delegate direct executor
 * @return a resetting executor
 * @throws SecurityException if the caller does not have the {@link RuntimePermission}{@code ("modifyThread")} permission
 */
public static DirectExecutor resettingExecutor(final DirectExecutor delegate) throws SecurityException {
  return cleanupExecutor(delegate, threadLocalResetter());
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

/**
 * Create a direct executor which delegates tasks to the given executor, and then clears <b>all</b> thread-local
 * data after each task completes (regardless of outcome).  You must have the {@link RuntimePermission}{@code ("modifyThread")}
 * permission to use this method.
 *
 * @param delegate the delegate direct executor
 * @return a resetting executor
 * @throws SecurityException if the caller does not have the {@link RuntimePermission}{@code ("modifyThread")} permission
 */
public static DirectExecutor resettingExecutor(final DirectExecutor delegate) throws SecurityException {
  return cleanupExecutor(delegate, threadLocalResetter());
}

代码示例来源:origin: org.jboss.threads/jboss-threads-metadata

return JBossExecutors.cleanupExecutor(createTaskFilterRecursive(it), JBossExecutors.contextClassLoaderResetter());
return JBossExecutors.cleanupExecutor(createTaskFilterRecursive(it), r);

相关文章

微信公众号

最新文章

更多