org.apache.pekko.extension.quartz
QuartzSchedulerExtension
Companion object QuartzSchedulerExtension
class QuartzSchedulerExtension extends Extension
Note that this extension will only be instantiated *once* *per actor system*.
- Alphabetic
- By Inheritance
- QuartzSchedulerExtension
- Extension
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new QuartzSchedulerExtension(system: ActorSystem)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def cancelJob(name: String): Boolean
Cancels the running job and all associated triggers
Cancels the running job and all associated triggers
- name
The name of the job, as defined in the schedule
- returns
Success or Failure in a Boolean
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def config: Config
- Attributes
- protected
- def createJobSchedule(name: String, receiver: ActorRef, msg: AnyRef, description: Option[String] = None, cronExpression: String, calendar: Option[String] = None, timezone: TimeZone = defaultTimezone): Date
Creates job, associated triggers and corresponding schedule at once.
Creates job, associated triggers and corresponding schedule at once.
- name
The name of the job, as defined in the schedule
- receiver
An ActorRef, who will be notified each time the schedule fires
- msg
A message object, which will be sent to
receivereach time the schedule fires- description
A string describing the purpose of the job
- cronExpression
A string with the cron-type expression
- calendar
An optional calendar to use.
- timezone
The time zone to use if different from default.
- returns
A date which indicates the first time the trigger will fire.
- def createSchedule(name: String, description: Option[String] = None, cronExpression: String, calendar: Option[String] = None, timezone: TimeZone = defaultTimezone): Unit
Create a schedule programmatically (must still be scheduled by calling 'schedule')
Create a schedule programmatically (must still be scheduled by calling 'schedule')
- name
A String identifying the job
- description
A string describing the purpose of the job
- cronExpression
A string with the cron-type expression
- calendar
An optional calendar to use.
- val daemonThreads_?: Boolean
- val defaultTimezone: TimeZone
- def deleteAll(): Unit
Deletes all jobs in the scheduler
- def deleteJobSchedule(name: String): Boolean
Deletes job, associated triggers and corresponding schedule at once.
Deletes job, associated triggers and corresponding schedule at once.
Remark: Identical to
unscheduleJob. Exists to provide consistent naming of related JobSchedule operations.- name
The name of the job, as defined in the schedule
- returns
Success or Failure in a Boolean
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def initialiseCalendars(): Unit
Parses calendar configurations, creates Calendar instances and attaches them to the scheduler
Parses calendar configurations, creates Calendar instances and attaches them to the scheduler
- Attributes
- protected
- def isInStandbyMode: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isStarted: Boolean
- lazy val jobStore: JobStore
- Attributes
- protected
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nextTrigger(name: String): Option[Date]
Returns the next Date a schedule will be fired
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def rescheduleJob(name: String, receiver: ActorRef, msg: AnyRef, description: Option[String] = None, cronExpression: String, calendar: Option[String] = None, timezone: TimeZone = defaultTimezone): Date
Reschedule a job
Reschedule a job
- name
A String identifying the job
- receiver
An ActorRef, who will be notified each time the schedule fires
- msg
A message object, which will be sent to
receivereach time the schedule fires- description
A string describing the purpose of the job
- cronExpression
A string with the cron-type expression
- calendar
An optional calendar to use.
- returns
A date which indicates the first time the trigger will fire.
- def resumeAll(): Unit
Unpauses all jobs in the scheduler
- def resumeJob(name: String): Boolean
Attempts to resume (un-pause) the given job
Attempts to resume (un-pause) the given job
- name
The name of the job, as defined in the schedule
- returns
Success or Failure in a Boolean
- val runningJobs: TrieMap[String, JobKey]
- def schedule(name: String, receiver: EventStream, msg: AnyRef, startDate: Option[Date]): Date
Schedule a job, whose named configuration must be available
Schedule a job, whose named configuration must be available
- name
A String identifying the job, which must match configuration
- receiver
An EventStream, who will be published to each time the schedule fires
- msg
A message object, which will be published to
receivereach time the schedule fires- returns
A date which indicates the first time the trigger will fire.
- def schedule(name: String, receiver: ActorSelection, msg: AnyRef, startDate: Option[Date]): Date
Schedule a job, whose named configuration must be available
Schedule a job, whose named configuration must be available
- name
A String identifying the job, which must match configuration
- receiver
An ActorSelection, who will be notified each time the schedule fires
- msg
A message object, which will be sent to
receivereach time the schedule fires- returns
A date which indicates the first time the trigger will fire.
- def schedule(name: String, receiver: ActorRef, msg: AnyRef, startDate: Option[Date]): Date
Schedule a job, whose named configuration must be available
Schedule a job, whose named configuration must be available
- name
A String identifying the job, which must match configuration
- receiver
An ActorRef, who will be notified each time the schedule fires
- msg
A message object, which will be sent to
receivereach time the schedule fires- returns
A date which indicates the first time the trigger will fire.
- def schedule(name: String, receiver: EventStream, msg: AnyRef): Date
Schedule a job, whose named configuration must be available
Schedule a job, whose named configuration must be available
- name
A String identifying the job, which must match configuration
- receiver
An EventStream, who will be published to each time the schedule fires
- msg
A message object, which will be published to
receivereach time the schedule fires- returns
A date which indicates the first time the trigger will fire.
- def schedule(name: String, receiver: ActorSelection, msg: AnyRef): Date
Schedule a job, whose named configuration must be available
Schedule a job, whose named configuration must be available
- name
A String identifying the job, which must match configuration
- receiver
An ActorSelection, who will be notified each time the schedule fires
- msg
A message object, which will be sent to
receivereach time the schedule fires- returns
A date which indicates the first time the trigger will fire.
- def schedule(name: String, receiver: ActorRef, msg: AnyRef): Date
Schedule a job, whose named configuration must be available
Schedule a job, whose named configuration must be available
- name
A String identifying the job, which must match configuration
- receiver
An ActorRef, who will be notified each time the schedule fires
- msg
A message object, which will be sent to
receivereach time the schedule fires- returns
A date which indicates the first time the trigger will fire.
- lazy val scheduler: Scheduler
- Attributes
- protected
- def schedulerName: String
- val schedules: TrieMap[String, QuartzSchedule]
Parses job and trigger configurations, preparing them for any code request of a matching job.
Parses job and trigger configurations, preparing them for any code request of a matching job. In our world, jobs and triggers are essentially 'merged' - our scheduler is built around triggers and jobs are basically 'idiot' programs who fire off messages.
- def shutdown(waitForJobsToComplete: Boolean = false): Unit
Shutdown the scheduler manually.
Shutdown the scheduler manually. The scheduler cannot be re-started.
- waitForJobsToComplete
wait for jobs to complete? default to false
- def standby(): Unit
Puts the Scheduler in 'standby' mode, temporarily halting firing of triggers.
Puts the Scheduler in 'standby' mode, temporarily halting firing of triggers. Resumable by running 'start'
- def start(): Boolean
Starts up the scheduler.
Starts up the scheduler. This is typically used from userspace only to restart a scheduler in standby mode.
- returns
True if calling this function resulted in the starting of the scheduler; false if the scheduler was already started.
- def suspendAll(): Unit
Suspends (pauses) all jobs in the scheduler
- def suspendJob(name: String): Boolean
Attempts to suspend (pause) the given job
Attempts to suspend (pause) the given job
- name
The name of the job, as defined in the schedule
- returns
Success or Failure in a Boolean
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val threadCount: Int
- lazy val threadPool: SimpleThreadPool
- Attributes
- protected
- val threadPriority: Int
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unscheduleJob(name: String): Boolean
Unschedule an existing schedule
Unschedule an existing schedule
Cancels the running job and all associated triggers and removes corresponding schedule entry from internal schedules map.
- name
The name of the job, as defined in the schedule
- returns
Success or Failure in a Boolean
- def updateJobSchedule(name: String, receiver: ActorRef, msg: AnyRef, description: Option[String] = None, cronExpression: String, calendar: Option[String] = None, timezone: TimeZone = defaultTimezone): Date
Updates job, associated triggers and corresponding schedule at once.
Updates job, associated triggers and corresponding schedule at once.
- name
The name of the job, as defined in the schedule
- receiver
An ActorRef, who will be notified each time the schedule fires
- msg
A message object, which will be sent to
receivereach time the schedule fires- description
A string describing the purpose of the job
- cronExpression
A string with the cron-type expression
- calendar
An optional calendar to use.
- timezone
The time zone to use if different from default.
- returns
A date which indicates the first time the trigger will fire.
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()