Builder

sealed class Builder<B : JobRequest.Builder<B>>(source)

Settings shared by every kind of request.

Inheritors

Functions

Link copied to clipboard
fun addTag(tag: String): B

Adds a tag used to observe or cancel this job together with others.

Link copied to clipboard
fun addTags(tags: Iterable<String>): B

Adds several tags at once.

Link copied to clipboard

Sets how retries are spaced apart.

Link copied to clipboard

Sets how retries are spaced apart, with the first retry delayed by millis.

Link copied to clipboard
fun setConstraints(constraints: Constraints): B

Sets the device conditions required before the job may run.

Link copied to clipboard
fun setId(id: JobId): B

Uses an explicit identifier instead of a generated one.

Link copied to clipboard
fun setInitialDelay(duration: Duration): B

Delays the first run by duration.

Link copied to clipboard

Delays the first run by millis.

Link copied to clipboard
fun setMaxAttempts(count: Int): B

Gives up on the job once it has been started count times.