StoredJob
data class StoredJob(val jobId: JobId, val jobArn: ARN, val targets: List<ARN>, val document: String?, val description: String?, val targetSelection: TargetSelection, val status: JobStatus, val comment: String?, val forceCanceled: Boolean?, val timeoutConfig: TimeoutConfig?, val createdAt: Timestamp, val lastUpdatedAt: Timestamp, val completedAt: Timestamp?, val executions: Map<ThingName, StoredJobExecution>)(source)
The job record FakeIot keeps, keyed by jobId. Public so that a Storage can be shared with FakeIotJobsDataPlane: construct both fakes over the same Storage instance and the control plane and the device API see one jobs state.
Mutating handlers in both fakes synchronize on the Storage instance itself, so when one store is shared across fakes and threads (a test driving the control plane while a bridge relays device-side updates), each request's read-modify-write is atomic and a cancel or delete cannot be overwritten by a concurrently relayed device update.
Constructors
Link copied to clipboard
constructor(jobId: JobId, jobArn: ARN, targets: List<ARN>, document: String?, description: String?, targetSelection: TargetSelection, status: JobStatus, comment: String?, forceCanceled: Boolean?, timeoutConfig: TimeoutConfig?, createdAt: Timestamp, lastUpdatedAt: Timestamp, completedAt: Timestamp?, executions: Map<ThingName, StoredJobExecution>)