本文整理了Java中org.jboss.threads.JBossExecutors.threadLocalResetter()
方法的一些代码示例,展示了JBossExecutors.threadLocalResetter()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JBossExecutors.threadLocalResetter()
方法的具体详情如下:
包路径:org.jboss.threads.JBossExecutors
类名称:JBossExecutors
方法名:threadLocalResetter
[英]Get a Runnable which, when executed, clears the thread-local storage of the calling thread. You must have the RuntimePermission ("modifyThread")permission to use this method.
[中]获取一个Runnable,当执行时,它将清除调用线程的线程本地存储。您必须具有RuntimePermission(“modifyThread”)权限才能使用此方法。
代码示例来源: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());
}
内容来源于网络,如有侵权,请联系作者删除!