public static final class GlideExecutor.Builder
extends java.lang.Object
GlideExecutors.| Modifier and Type | Field and Description |
|---|---|
static long |
NO_THREAD_TIMEOUT
Prevents core and non-core threads from timing out ever if provided to
setThreadTimeoutMillis(long). |
| Modifier and Type | Method and Description |
|---|---|
GlideExecutor |
build()
Builds a new
GlideExecutor with any previously specified options. |
GlideExecutor.Builder |
setName(java.lang.String name)
Sets the prefix to use for each thread name created by any
GlideExecutors built by
this Builder. |
GlideExecutor.Builder |
setThreadCount(int threadCount)
Sets the maximum number of threads to use.
|
GlideExecutor.Builder |
setThreadTimeoutMillis(long threadTimeoutMillis)
Allows both core and non-core threads in the executor to be terminated if no tasks arrive for
at least the given timeout milliseconds.
|
GlideExecutor.Builder |
setUncaughtThrowableStrategy(GlideExecutor.UncaughtThrowableStrategy strategy)
Sets the
GlideExecutor.UncaughtThrowableStrategy to use for unexpected exceptions thrown by tasks
on GlideExecutors built by this Builder. |
public static final long NO_THREAD_TIMEOUT
setThreadTimeoutMillis(long).public GlideExecutor.Builder setThreadTimeoutMillis(long threadTimeoutMillis)
Use NO_THREAD_TIMEOUT to remove a previously set timeout.
public GlideExecutor.Builder setThreadCount(int threadCount)
public GlideExecutor.Builder setUncaughtThrowableStrategy(@NonNull GlideExecutor.UncaughtThrowableStrategy strategy)
GlideExecutor.UncaughtThrowableStrategy to use for unexpected exceptions thrown by tasks
on GlideExecutors built by this Builder.public GlideExecutor.Builder setName(java.lang.String name)
GlideExecutors built by
this Builder.public GlideExecutor build()
GlideExecutor with any previously specified options.