-
public final class ImageExecutor.BuilderA builder for ImageExecutors.
-
-
Field Summary
Fields Modifier and Type Field Description public final static longNO_THREAD_TIMEOUTprivate ImageExecutor.UncaughtThrowableStrategyuncaughtThrowableStrategyprivate Stringnameprivate longthreadTimeoutMillis
-
Method Summary
Modifier and Type Method Description ImageExecutor.BuildersetUncaughtThrowableStrategy(@NonNull() ImageExecutor.UncaughtThrowableStrategy strategy)Sets the UncaughtThrowableStrategy to use for unexpected exceptions thrown by taskson ImageExecutors built by this {@code Builder}.ImageExecutor.BuildersetName(String name)Sets the prefix to use for each thread name created by any ImageExecutors built bythis {@code Builder}.ImageExecutor.BuildersetThreadTimeoutMillis(long threadTimeoutMillis)Allows both core and non-core threads in the executor to be terminated if no tasks arrive forat least the given timeout milliseconds. ImageExecutor.BuildersetThreadCount(@IntRange(from = 1) int threadCount)Sets the maximum number of threads to use. ImageExecutorbuild()Builds a new ImageExecutor with any previously specified options. -
-
Method Detail
-
setUncaughtThrowableStrategy
ImageExecutor.Builder setUncaughtThrowableStrategy(@NonNull() ImageExecutor.UncaughtThrowableStrategy strategy)
Sets the UncaughtThrowableStrategy to use for unexpected exceptions thrown by taskson ImageExecutors built by this
{@code Builder}.
-
setName
ImageExecutor.Builder setName(String name)
Sets the prefix to use for each thread name created by any ImageExecutors built bythis
{@code Builder}.
-
setThreadTimeoutMillis
ImageExecutor.Builder setThreadTimeoutMillis(long threadTimeoutMillis)
Allows both core and non-core threads in the executor to be terminated if no tasks arrive forat least the given timeout milliseconds.
Use NO_THREAD_TIMEOUT to remove a previously set timeout.
-
setThreadCount
ImageExecutor.Builder setThreadCount(@IntRange(from = 1) int threadCount)
Sets the maximum number of threads to use.
-
build
ImageExecutor build()
Builds a new ImageExecutor with any previously specified options.
-
-
-
-