Class/Object

de.kaufhof.hajobs

JobManager

Related Docs: object JobManager | package hajobs

Permalink

class JobManager extends AnyRef

A JobManager is responsible for running jobs. It creates the infrastructure, checks locking etc. for job running

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JobManager
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JobManager(jobs: Seq[Job], lockRepo: LockRepository, jobStatusRepo: JobStatusRepository, actorSystem: ActorSystem, sched: Scheduler = JobManager.createScheduler, enableJobScheduling: Boolean = true, schedulesTimeZone: TimeZone = TimeZone.getTimeZone("UTC"))

    Permalink
  2. new JobManager(managedJobs: ⇒ Jobs, lockRepo: LockRepository, jobStatusRepo: JobStatusRepository, actorSystem: ActorSystem, scheduler: Scheduler, enableJobScheduling: Boolean, schedulesTimeZone: TimeZone)

    Permalink

    managedJobs

    all the jobs the manager knows and may manage. Jobs are defined lazy, so that the jobs map can contain jobs that themselves need the JobManager (allow cyclic dependencies)

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def acceptableDelayAfterRestart(jobType: JobType): Duration

    Permalink

    If a job run was missing due to a server downtime, a job is started immediately after a restart if the next scheduled run is more than this duration in the future.

    If a job run was missing due to a server downtime, a job is started immediately after a restart if the next scheduled run is more than this duration in the future. By default, this is set to 30 minutes for all job types, but it can be overridden in subclasses.

    Attributes
    protected
  5. def allJobStatus(jobType: JobType, limit: Int = 20): Future[List[JobStatus]]

    Permalink
  6. def allJobsScheduled: Future[Boolean]

    Permalink

    Future that is redeemed with true when all jobs are successfully scheduled.

    Future that is redeemed with true when all jobs are successfully scheduled. If not all jobs are scheduled for some reason, the value will be false (job scheduling deactivated) or the future will be failed with an exception.

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def cancelJob(jobType: JobType): Unit

    Permalink
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def ensureJobPreconditions(): Future[_]

    Permalink

    Can be overridden in subclasses if something has to be done before any job can be started, e.g.

    Can be overridden in subclasses if something has to be done before any job can be started, e.g. checking that all caches are initialized completely. By default, just returns Future.sucessful.

    Attributes
    protected
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def getAllJobTypes(): Future[List[JobType]]

    Permalink
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def getCronExpression(jobType: JobType): Option[String]

    Permalink
  17. def getJob(jobType: JobType): Job

    Permalink
  18. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  19. def init(): Unit

    Permalink
    Attributes
    protected
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. def jobStartTimeout(jobType: JobType): Timeout

    Permalink
    Attributes
    protected
  22. def jobStatus(jobType: JobType, jobId: UUID): Future[Option[JobStatus]]

    Permalink
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def now: DateTime

    Permalink

    Can be overridden in tests.

    Can be overridden in tests.

    Attributes
    protected
  27. def retriggerJob(jobType: JobType, triggerId: UUID): Future[JobStartStatus]

    Permalink

    Restarts a job for specified trigger id.

    Restarts a job for specified trigger id. Part of (re-)starting a job is locking for that job and managing the lifecycle of the KeepLockActor. So the this method does the following: - Acquire and release the lock for the job - Trigger in case of success the job - Starting and stopping the KeepJobLockActor

    jobType

    JobType of the job to start

    triggerId

    Trigger Id to restart

    returns

    StartStatus, f.e. Started if job could be started or LockedStatus if job is already running.

  28. def runJobNowIfPreviousRunWasSkipped(cronExpression: String, jobType: JobType): Future[Boolean]

    Permalink
    Attributes
    protected
  29. def scheduleJob(jobToSchedule: Job): Future[Unit]

    Permalink
    Attributes
    protected
  30. def scheduleJobs(): Future[Unit]

    Permalink
    Attributes
    protected
  31. def shutdown(): Unit

    Permalink
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  34. def triggerJob(jobType: JobType): Future[JobStartStatus]

    Permalink

    Start a job

    Start a job

    jobType

    JobType of the job to start

    returns

    StartStatus, f.e. Started if job could be started or LockedStatus if job is already running

  35. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped