Trait/Object

quasar.precog.common.jobs

JobManager

Related Docs: object JobManager | package jobs

Permalink

trait JobManager[M[+_]] extends AnyRef

Self Type
JobManager[M]
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

Abstract Value Members

  1. abstract def abort(job: JobId, reason: String, abortedAt: LocalDateTime = LocalDateTime.now): M[Either[String, Job]]

    Permalink

    Aborts a job by putting it into the Aborted state.

    Aborts a job by putting it into the Aborted state. This is a terminal state.

  2. abstract def addMessage(job: JobId, channel: ChannelId, value: JValue): M[Message]

    Permalink

    Add a message to a job's channel.

    Add a message to a job's channel. If the channel does not exist, it will be created.

  3. abstract def cancel(job: JobId, reason: String, cancelledAt: LocalDateTime = LocalDateTime.now): M[Either[String, Job]]

    Permalink

    Cancels a job.

    Cancels a job. This doesn't necessarily mean the job has actually stopped, it is just used to let the worker know a cancellation was requested. It is up to the worker to abort the job. A cancelled job may still be completed normally or aborted for other reasons than the cancellation. The reason should give a useful string about why the cancellation was requested (eg. "User action." or "Server restart.").

  4. abstract def createJob(auth: APIKey, name: String, jobType: String, data: Option[JValue], started: Option[LocalDateTime]): M[Job]

    Permalink

    Create a new Job with the given API key, name, type and possibly an initial status message and expiration.

    Create a new Job with the given API key, name, type and possibly an initial status message and expiration. If a started time is provided, then the job will be put in the Started state, otherwise it will be in the NotStarted state until start(...) is run.

  5. abstract def expire(job: JobId, expiredAt: LocalDateTime = LocalDateTime.now): M[Either[String, Job]]

    Permalink

    Moves the job to the Expired terminal state.

  6. abstract def findJob(job: JobId): M[Option[Job]]

    Permalink

    Returns the Job with the given ID if it exists.

  7. abstract def finish(job: JobId, finishedAt: LocalDateTime = LocalDateTime.now): M[Either[String, Job]]

    Permalink

    Moves the job to the Finished terminal state, with the given value as the result.

  8. abstract def getResult(job: JobId): M[Either[String, (Option[MimeType], StreamT[M, Array[Byte]])]]

    Permalink
  9. abstract def getStatus(job: JobId): M[Option[Status]]

    Permalink

    Returns just the latest status message.

  10. abstract def listChannels(job: JobId): M[Seq[ChannelId]]

    Permalink

    Lists all channels that have had messages posted to them.

    Lists all channels that have had messages posted to them. Note that channels are created on a demand by addMessage, so this is not a definitive list of channels, just what existed at the time.

  11. abstract def listJobs(apiKey: APIKey): M[Seq[Job]]

    Permalink

    Returns a list of all currently running jobs

  12. abstract def listMessages(job: JobId, channel: ChannelId, since: Option[MessageId]): M[Seq[Message]]

    Permalink

    Returns all the messages posted to a job's channel since some specified message.

    Returns all the messages posted to a job's channel since some specified message. If no previous message is given, then all messages posted to the given channel are returned.

  13. abstract def setResult(job: JobId, mimeType: Option[MimeType], data: StreamT[M, Array[Byte]]): M[Either[String, Unit]]

    Permalink
  14. abstract def start(job: JobId, startedAt: LocalDateTime = LocalDateTime.now): M[Either[String, Job]]

    Permalink

    Starts a job if it is in the NotStarted state, otherwise an error string is returned.

  15. abstract def updateStatus(job: JobId, prevStatus: Option[StatusId], msg: String, progress: BigDecimal, unit: String, extra: Option[JValue]): M[Either[String, Status]]

    Permalink

    Updates a job's status to value.

    Updates a job's status to value. If a prevStatus is provided, then this must match the current status in order for the update to succeed, otherwise the update fails and the actual current status is returned.

Concrete 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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. def withM[N[+_]](implicit t: ~>[M, N], u: ~>[N, M], M: Monad[M], N: Monad[N]): JobManager[N]

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped