Uses of Interface
java.util.concurrent.ThreadFactory
-
Packages that use ThreadFactory 软件包 描述 java.lang.ref 提供引用对象类,它支持与垃圾收集器的有限程度的交互。java.nio.channels 定义通道,表示与能够执行I / O操作的实体的连接,例如文件和套接字; 定义选择器,用于多路复用,非阻塞I / O操作。java.nio.channels.spi java.nio.channels
程序包的服务提供程序类。java.util.concurrent 实用类通常在并发编程中有用。 -
-
Uses of ThreadFactory in java.lang.ref
Methods in java.lang.ref with parameters of type ThreadFactory 变量和类型 方法 描述 static Cleaner
Cleaner. create(ThreadFactory threadFactory)
返回一个新Cleaner
使用Thread
从ThreadFactory
。 -
Uses of ThreadFactory in java.nio.channels
Methods in java.nio.channels with parameters of type ThreadFactory 变量和类型 方法 描述 static AsynchronousChannelGroup
AsynchronousChannelGroup. withFixedThreadPool(int nThreads, ThreadFactory threadFactory)
创建具有固定线程池的异步通道组。 -
Uses of ThreadFactory in java.nio.channels.spi
Methods in java.nio.channels.spi with parameters of type ThreadFactory 变量和类型 方法 描述 abstract AsynchronousChannelGroup
AsynchronousChannelProvider. openAsynchronousChannelGroup(int nThreads, ThreadFactory threadFactory)
构造具有固定线程池的新异步通道组。 -
Uses of ThreadFactory in java.util.concurrent
Methods in java.util.concurrent that return ThreadFactory 变量和类型 方法 描述 static ThreadFactory
Executors. defaultThreadFactory()
返回用于创建新线程的默认线程工厂。ThreadFactory
ThreadPoolExecutor. getThreadFactory()
返回用于创建新线程的线程工厂。static ThreadFactory
Executors. privilegedThreadFactory()
返回一个线程工厂,用于创建与当前线程具有相同权限的新线程。Methods in java.util.concurrent with parameters of type ThreadFactory 变量和类型 方法 描述 static ExecutorService
Executors. newCachedThreadPool(ThreadFactory threadFactory)
创建一个根据需要创建新线程的线程池,但在它们可用时将重用以前构造的线程,并在需要时使用提供的ThreadFactory创建新线程。static ExecutorService
Executors. newFixedThreadPool(int nThreads, ThreadFactory threadFactory)
创建一个线程池,该线程池重用在共享的无界队列中运行的固定数量的线程,使用提供的ThreadFactory在需要时创建新线程。static ScheduledExecutorService
Executors. newScheduledThreadPool(int corePoolSize, ThreadFactory threadFactory)
创建一个线程池,可以调度命令在给定的延迟后运行,或者定期执行。static ExecutorService
Executors. newSingleThreadExecutor(ThreadFactory threadFactory)
创建一个Executor,它使用一个在无界队列中运行的工作线程,并在需要时使用提供的ThreadFactory创建一个新线程。static ScheduledExecutorService
Executors. newSingleThreadScheduledExecutor(ThreadFactory threadFactory)
创建一个单线程执行程序,可以调度命令在给定的延迟后运行,或定期执行。void
ThreadPoolExecutor. setThreadFactory(ThreadFactory threadFactory)
设置用于创建新线程的线程工厂。Constructors in java.util.concurrent with parameters of type ThreadFactory 构造器 描述 ScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory)
使用给定的初始参数创建新的ScheduledThreadPoolExecutor
。ScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler)
使用给定的初始参数创建新的ScheduledThreadPoolExecutor
。ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory)
创建一个新的ThreadPoolExecutor
给定的初始参数和default rejected execution handler 。ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler)
使用给定的初始参数创建新的ThreadPoolExecutor
。
-