public static final class Configuration.Builder
extends Object


A Builder for Configurations.


Public constructors


Creates a new Configuration.Builder.

Public methods

Configuration build()

Builds a Configuration object.

Configuration.Builder setDefaultProcessName(String processName)

Designates the primary process that WorkManager should schedule work in.

Configuration.Builder setExecutor(Executor executor)

Specifies a custom Executor for WorkManager.

Configuration.Builder setInputMergerFactory(InputMergerFactory inputMergerFactory)

Specifies a custom InputMergerFactory for WorkManager.

Configuration.Builder setJobSchedulerJobIdRange(int minJobSchedulerId, int maxJobSchedulerId)

Specifies the range of JobInfo IDs that can be used by WorkManager.

Configuration.Builder setMaxSchedulerLimit(int maxSchedulerLimit)

Specifies the maximum number of system requests made by WorkManager when using JobScheduler or AlarmManager.

Configuration.Builder setMinimumLoggingLevel(int loggingLevel)

Specifies the minimum logging level, corresponding to the constants found in Log.

Configuration.Builder setRunnableScheduler(RunnableScheduler runnableScheduler)

Specifies the RunnableScheduler to be used by WorkManager.

Configuration.Builder setTaskExecutor(Executor taskExecutor)

Specifies a Executor which will be used by WorkManager for all its internal book-keeping.

Configuration.Builder setWorkerFactory(WorkerFactory workerFactory)

Specifies a custom WorkerFactory for WorkManager.

Inherited methods