Class SiloJobsBackend

java.lang.Object
se.l4.jobs.backend.silo.SiloJobsBackend
All Implemented Interfaces:
JobsBackend

public class SiloJobsBackend
extends Object
implements JobsBackend
This backend will store jobs in a Silo entity. This allows for persisting jobs within a single process.

To use this backend define an entity either using defineJobEntity(SiloBuilder, String) or defineJobEntity(StructuredEntityBuilder). This entity should then be provided to the constructor after being fetched using Silo.structured(String).

This works by queuing up a task for the closest job. When the tasks runs all of the jobs that have past their timestamp will be run. After this is done the task will be queued up again.