JobRequest

sealed class JobRequest(source)

A unit of background work handed to Jabbit.enqueue.

Build requests with oneTimeJob and periodicJob, which take the JobType of the job and the payload it should run with.

Inheritors

Types

Link copied to clipboard
sealed class Builder<B : JobRequest.Builder<B>>

Settings shared by every kind of request.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val backoffDelay: Duration

Delay applied to the first retry.

Link copied to clipboard

backoffDelay in milliseconds, for callers without kotlin.time.Duration.

Link copied to clipboard

How the retry delay grows between attempts.

Link copied to clipboard
abstract val constraints: Constraints

Device conditions required before the job may run.

Link copied to clipboard
abstract val id: JobId

Identifier the job will be enqueued under.

Link copied to clipboard
abstract val initialDelay: Duration

Delay before the first run.

Link copied to clipboard

initialDelay in milliseconds, for callers without kotlin.time.Duration.

Link copied to clipboard
abstract val maxAttempts: Int

How many times the job may be started before it is given up on.

Link copied to clipboard
abstract val tags: Set<String>

Tags used to observe or cancel groups of jobs.

Link copied to clipboard
abstract val typeName: String

Name of the JobType this job belongs to.