Class GlideExecutor.Builder

java.lang.Object
com.bumptech.glide.load.engine.executor.GlideExecutor.Builder
Enclosing class:
GlideExecutor

public static final class GlideExecutor.Builder extends Object
A builder for GlideExecutors.
  • Field Details

  • Method Details

    • setThreadTimeoutMillis

      public 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.

      Use NO_THREAD_TIMEOUT to remove a previously set timeout.

    • setThreadCount

      public GlideExecutor.Builder setThreadCount(@IntRange(from=1L) int threadCount)
      Sets the maximum number of threads to use.
    • setThreadFactory

      @Deprecated public GlideExecutor.Builder setThreadFactory(@NonNull ThreadFactory threadFactory)
      Deprecated.
      This is an experimental method that may be removed without warning in a future version.
      Sets the ThreadFactory responsible for creating threads and setting their priority.

      Usage of this method may override other options on this builder. No guarantees are provided with regards to the behavior of this method or how it interacts with other methods on the builder. Use at your own risk.

    • setUncaughtThrowableStrategy

      public GlideExecutor.Builder setUncaughtThrowableStrategy(@NonNull GlideExecutor.UncaughtThrowableStrategy strategy)
      Sets the GlideExecutor.UncaughtThrowableStrategy to use for unexpected exceptions thrown by tasks on GlideExecutors built by this Builder.
    • setName

      public GlideExecutor.Builder setName(String name)
      Sets the prefix to use for each thread name created by any GlideExecutors built by this Builder.
    • build

      public GlideExecutor build()
      Builds a new GlideExecutor with any previously specified options.