Class TransactionalSchedulerContext
java.lang.Object
dev.getelements.elements.rt.transact.TransactionalSchedulerContext
- All Implemented Interfaces:
SchedulerContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidResumes the supplied task with theTaskIdsupplying multiple results to the destination.voidresumeFromNetwork(TaskId taskId, Object result) Resumes a task that was waiting on a network call.voidresumeTaskAfterDelay(TaskId taskId, long time, TimeUnit timeUnit) Resumes the task associated with the suppliedTaskId.voidresumeWithError(TaskId taskId, Throwable throwable) Resumes a task that was waiting for any reason.voidsetPersistence(TransactionalResourceServicePersistence persistence) voidsetResourceService(ResourceService resourceService) voidsetSimpleSchedulerContext(SimpleSchedulerContext simpleSchedulerContext) voidstart()Starts thisSchedulerContext.voidstop()Stops thisSchedulerContext.
-
Constructor Details
-
TransactionalSchedulerContext
public TransactionalSchedulerContext()
-
-
Method Details
-
start
public void start()Description copied from interface:SchedulerContextStarts thisSchedulerContext.- Specified by:
startin interfaceSchedulerContext
-
stop
public void stop()Description copied from interface:SchedulerContextStops thisSchedulerContext.- Specified by:
stopin interfaceSchedulerContext
-
resume
Description copied from interface:SchedulerContextResumes the supplied task with theTaskIdsupplying multiple results to the destination.- Specified by:
resumein interfaceSchedulerContext- Parameters:
taskId- theTaskIdof the supplied taskresults- zero or more results from resuming the task
-
resumeTaskAfterDelay
Description copied from interface:SchedulerContextResumes the task associated with the suppliedTaskId. This allows for the specification of a delay after a specified period of time.- Specified by:
resumeTaskAfterDelayin interfaceSchedulerContext- Parameters:
taskId- theTaskIdof the tasktime- the time delaytimeUnit- theTimeUnitinstance designating the time units of measure
-
resumeFromNetwork
Description copied from interface:SchedulerContextResumes a task that was waiting on a network call.- Specified by:
resumeFromNetworkin interfaceSchedulerContext- Parameters:
taskId- the uniqueTaskIdassociated with the networkresult- the result of the network operation, passed to the task
-
resumeWithError
Description copied from interface:SchedulerContextResumes a task that was waiting for any reason. This is used to hand an error to the running task in order to a task waiting on an operation.- Specified by:
resumeWithErrorin interfaceSchedulerContext- Parameters:
taskId- the uniqueTaskIdassociated with the networkthrowable- the error in the blocked operation
-
getResourceService
-
setResourceService
-
getSimpleSchedulerContext
-
setSimpleSchedulerContext
-
getPersistence
-
setPersistence
-