Package

de.kaufhof

hajobs

Permalink

package hajobs

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

Type Members

  1. class ActorJob extends Job

    Permalink

    A Job that runs the given actor (creates a new actor instance).

    A Job that runs the given actor (creates a new actor instance).

    The actor must: $ - stop() itself (e.g. via ActorContext.stop once it's finished $ - handle ActorJob.Cancel and stop itself when it received this message

  2. case class Error(details: String) extends JobStartStatus with Product with Serializable

    Permalink
  3. abstract class Job extends AnyRef

    Permalink

    Base class for jobs, job execution is started via run().

    Base class for jobs, job execution is started via run(). For actor jobs you can just use the ActorJob.

  4. case class JobContext(jobType: JobType, jobId: UUID, triggerId: UUID) extends Product with Serializable

    Permalink

    Details regarding a job execution.

  5. abstract class JobExecution extends AnyRef

    Permalink

    The actual execution of a certain Job.

  6. class JobExecutor extends Actor with ActorLogging

    Permalink

    Executes jobs, manages currently running jobs.

  7. class JobManager extends AnyRef

    Permalink

    A JobManager is responsible for running jobs.

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

  8. abstract class JobStartStatus extends AnyRef

    Permalink

    JobStartStatus classes are used to communicate the result of a job start request.

  9. case class JobStatus(triggerId: UUID, jobType: JobType, jobId: UUID, jobState: JobState, jobResult: JobResult, jobStatusTs: DateTime, content: Option[JsValue] = None) extends Product with Serializable

    Permalink

    Represents Status of Import Jobs

    Represents Status of Import Jobs

    jobId

    should represent the Job start time as time-based UUID (type 1)

  10. class JobStatusRepository extends StatusWriter

    Permalink

    Repository to manage job status in the database.

    Repository to manage job status in the database. Write and Read Methods can be called with Consitency Level LOCAL_QUORUM to get consistent Job data from Cassandra. This is necessary to prevent the JobSupervisor from setting Finished Jobs to Dead Jobs

  11. class JobSupervisor extends Job

    Permalink

    Checks if for jobs in state RUNNING there's a lock as well.

    Checks if for jobs in state RUNNING there's a lock as well. If this is not the case, the job is considered to be crashed (because a job must regularly update the corresponding lock).

  12. case class JobType(name: String, lockType: LockType) extends Product with Serializable

    Permalink

    The job type, identified by its name, specifies a LockType.

    The job type, identified by its name, specifies a LockType.

    JobTypes do not override toString so that there can more useful log output when a jobType is just printed. When storing a reference to a JobType e.g. in C*, the name property must be used instead of toString (like it's done for Enumerations).

  13. case class JobTypes(all: Iterable[JobType]) extends Product with Serializable

    Permalink
  14. class JobUpdater extends AnyRef

    Permalink

    JobUpdater is responsible finding running/pending jobs that have lost its lock and set them to status failed/dead JobUpdater tries to get latest JobStatusData to update status, so one can see the latest content of the dead job.

  15. type Jobs = Map[JobType, Job]

    Permalink
  16. class KeepJobLockedActor extends Actor with ActorLogging

    Permalink

    An Actor which helps to keep long running sychronous job tasks alive by updating the job lock periodically.

  17. case class Lock(lockType: LockType, jobId: UUID) extends Product with Serializable

    Permalink

    A Lock exists for jobType and jobId.

  18. class LockRepository extends AnyRef

    Permalink

    This repository manages locks for jobs syncronization in distributed environments.

    This repository manages locks for jobs syncronization in distributed environments. To work every kind of job needs an unique identifier (jobType) and every job run an unique identifier (jobId) If a job acquires a lock, it will only get it, if there isn't already a jobId saved for that jobType. The jobId of the running job will be saved with a ttl to the lock table. A running job needs to renew its lock to show it's still active and not died.

    We use Consistency Level Quorum to ensure that a Job is Locked or is not Locked. The CL makes the Lock mechanism more deterministic.

  19. case class LockType(name: String) extends Product with Serializable

    Permalink

    A LockType describes a lock used by a JobType (e.g.

    A LockType describes a lock used by a JobType (e.g. JobType(stockFeed) can reference a LockType(stock)).

  20. case class LockTypes(all: Iterable[LockType]) extends Product with Serializable

    Permalink
  21. case class LockedStatus(runningId: Option[UUID] = None) extends JobStartStatus with Product with Serializable

    Permalink
  22. case class Started(jobId: UUID, details: Option[JsValue] = None) extends JobStartStatus with Product with Serializable

    Permalink
  23. trait StatusWriter extends AnyRef

    Permalink
  24. trait WriteStatus extends AnyRef

    Permalink

    Supports shortcut to store the job status, can be mixed into Jobs.

Value Members

  1. object ActorJob

    Permalink
  2. object JobExecutor

    Permalink
  3. object JobManager

    Permalink
  4. object JobResult extends Enumeration

    Permalink
  5. object JobState extends Enumeration

    Permalink
  6. object JobStatus extends Serializable

    Permalink
  7. object JobStatusRepository

    Permalink
  8. object JobType extends Serializable

    Permalink
  9. object JobTypes extends Serializable

    Permalink
  10. object JobUpdater

    Permalink
  11. def Jobs(jobs: Seq[Job]): Jobs

    Permalink
  12. object KeepJobLockedActor

    Permalink
  13. object LockTypes extends Serializable

    Permalink
  14. final def retry[T](n: Int, description: String)(fn: ⇒ Future[T])(implicit ec: ExecutionContext): Future[T]

    Permalink

    Tries function max n times.

  15. package utils

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped