public abstract class ExecutorProvider extends Object
Constructor and Description |
---|
ExecutorProvider() |
Modifier and Type | Method and Description |
---|---|
static ExecutorService |
getExecutorService(float fractionThreads)
Returns an ExecutorService for Callables that use a given fraction of computer resources.
|
static ExecutorService |
getExecutorService(int nThreads)
Returns an ExecutorService for Callables that use nThreads number of threads.
|
static ExecutorProvider |
getProvider() |
abstract ExecutorService |
getService(float fractionThreads) |
abstract ExecutorService |
getService(int nThreads) |
static void |
setProvider(ExecutorProvider ep) |
public static ExecutorService getExecutorService(int nThreads)
nThreads
- the number of Threads used by a given Callable.public static ExecutorService getExecutorService(float fractionThreads)
fractionThreads
- the fraction of resources that a submitted Callable is expected to
need.public static void setProvider(ExecutorProvider ep)
public static ExecutorProvider getProvider()
public abstract ExecutorService getService(int nThreads)
public abstract ExecutorService getService(float fractionThreads)
Copyright © 2015–2021 Fiji. All rights reserved.