abstract class EnterpriseScheduler extends Scheduler with NamedLogging
Reusable scheduler base class only available in the Enterprise Edition: - Based on a single-threaded scheduled executor. - Also manages schedule persistence reacting to schedule changes.
Encapsulates generic scheduling logic reusable by specific schedulers.
- Alphabetic
- By Inheritance
- EnterpriseScheduler
- NamedLogging
- Scheduler
- AutoCloseable
- StartStoppable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new EnterpriseScheduler(name: String, processingTimeouts: ProcessingTimeout, loggerFactory: NamedLoggerFactory)(implicit ec: ExecutionContext)
Abstract Value Members
- abstract def clearSchedule()(implicit traceContext: TraceContext): Future[Unit]
- Definition Classes
- Scheduler
- abstract def close(): Unit
- Definition Classes
- AutoCloseable
- Annotations
- @throws(classOf[java.lang.Exception])
- abstract def initializeSchedule()(implicit traceContext: TraceContext): Future[Option[EnterpriseSchedule]]
Hook to create and initialize the schedule when scheduler becomes active
Hook to create and initialize the schedule when scheduler becomes active
- returns
if override returns Some[A] go ahead and schedule; if None don't
- abstract def schedulerJob(schedule: IndividualSchedule)(implicit traceContext: TraceContext): Future[ScheduledRunResult]
Implements the code that is to be executed when the scheduled time has arrived for the duration of the "maxDuration".
Implements the code that is to be executed when the scheduled time has arrived for the duration of the "maxDuration". Within a single such "window" schedulerJob will be called until "Done" is returned as a result the first time.
As guidance long running logic should be broken up into "chunks" expected to run at most for 1 minute although in the face of unpredictable database performance this is a "best effort". Tasks may exceed the "maxDuration" window by however long they take to execute.
- schedule
the specific schedule among the potentially multiple schedulers that triggered this particular job run. Useful for callees to extract additional information (such as retention for pruning) or to determine the type of work scheduled (e.g. pruning versus pruning metric update).
- abstract def updateCron(cron: Cron)(implicit traceContext: TraceContext): EitherT[Future, String, Unit]
- Definition Classes
- Scheduler
- abstract def updateMaxDuration(maxDuration: PositiveSeconds)(implicit traceContext: TraceContext): EitherT[Future, String, Unit]
- Definition Classes
- Scheduler
Concrete 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 clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def deactivate()(implicit traceContext: TraceContext): Unit
- Attributes
- protected
- implicit val ec: ExecutionContext
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isScheduleActivated: Boolean
- Attributes
- protected
- def logger: TracedLogger
- Attributes
- protected
- Definition Classes
- NamedLogging
- val loggerFactory: NamedLoggerFactory
- Definition Classes
- EnterpriseScheduler → NamedLogging
- implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noTracingLogger: Logger
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def reactivateSchedulerIfActive()(implicit traceContext: TraceContext): Future[Unit]
- def reactivateSchedulerIfActiveET()(implicit traceContext: TraceContext): EitherT[Future, String, Unit]
- def restart()(implicit traceContext: TraceContext): Future[Unit]
Convenience method for restart
Convenience method for restart
- Definition Classes
- StartStoppable
- def start()(implicit traceContext: TraceContext): Future[Unit]
Start scheduler(s).
Start scheduler(s).
- Definition Classes
- EnterpriseScheduler → StartStoppable
- def stop()(implicit traceContext: TraceContext): Unit
Stop scheduler(s).
Stop scheduler(s).
- Definition Classes
- EnterpriseScheduler → StartStoppable
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def updateScheduleAndReactivateIfActive(update: => Future[Unit])(implicit traceContext: TraceContext): Future[Unit]
- 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()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])