Uses of Interface
java.util.concurrent.ThreadFactory
| Package | Description |
|---|---|
| com.squareup.okhttp.internal | |
| java.util.concurrent |
Utility classes commonly useful in concurrent programming.
|
-
Uses of ThreadFactory in com.squareup.okhttp.internal
Methods in com.squareup.okhttp.internal that return ThreadFactory Modifier and Type Method Description static ThreadFactoryUtil. daemonThreadFactory(String name) -
Uses of ThreadFactory in java.util.concurrent
Methods in java.util.concurrent that return ThreadFactory Modifier and Type Method Description static ThreadFactoryExecutors. defaultThreadFactory()Returns a default thread factory used to create new threads.ThreadFactoryThreadPoolExecutor. getThreadFactory()Returns the thread factory used to create new threads.static ThreadFactoryExecutors. privilegedThreadFactory()Legacy security code; do not use.Methods in java.util.concurrent with parameters of type ThreadFactory Modifier and Type Method Description static ExecutorServiceExecutors. newCachedThreadPool(ThreadFactory threadFactory)Creates a thread pool that creates new threads as needed, but will reuse previously constructed threads when they are available, and uses the provided ThreadFactory to create new threads when needed.static ExecutorServiceExecutors. newFixedThreadPool(int nThreads, ThreadFactory threadFactory)Creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue, using the provided ThreadFactory to create new threads when needed.static ScheduledExecutorServiceExecutors. newScheduledThreadPool(int corePoolSize, ThreadFactory threadFactory)Creates a thread pool that can schedule commands to run after a given delay, or to execute periodically.static ExecutorServiceExecutors. newSingleThreadExecutor(ThreadFactory threadFactory)Creates an Executor that uses a single worker thread operating off an unbounded queue, and uses the provided ThreadFactory to create a new thread when needed.static ScheduledExecutorServiceExecutors. newSingleThreadScheduledExecutor(ThreadFactory threadFactory)Creates a single-threaded executor that can schedule commands to run after a given delay, or to execute periodically.voidThreadPoolExecutor. setThreadFactory(ThreadFactory threadFactory)Sets the thread factory used to create new threads.Constructors in java.util.concurrent with parameters of type ThreadFactory Constructor Description ScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory)Creates a newScheduledThreadPoolExecutorwith the given initial parameters.ScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler)Creates a new ScheduledThreadPoolExecutor with the given initial parameters.ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory)Creates a newThreadPoolExecutorwith the given initial parameters and default rejected execution handler.ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler)Creates a newThreadPoolExecutorwith the given initial parameters.