Class TransactionalSchedulerContext
java.lang.Object
dev.getelements.elements.rt.transact.TransactionalSchedulerContext
- All Implemented Interfaces:
SchedulerContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Resumes the supplied task with theTaskId
supplying multiple results to the destination.void
resumeFromNetwork
(TaskId taskId, Object result) Resumes a task that was waiting on a network call.void
resumeTaskAfterDelay
(TaskId taskId, long time, TimeUnit timeUnit) Resumes the task associated with the suppliedTaskId
.void
resumeWithError
(TaskId taskId, Throwable throwable) Resumes a task that was waiting for any reason.void
setPersistence
(TransactionalResourceServicePersistence persistence) void
setResourceService
(ResourceService resourceService) void
setSimpleSchedulerContext
(SimpleSchedulerContext simpleSchedulerContext) void
start()
Starts thisSchedulerContext
.void
stop()
Stops thisSchedulerContext
.
-
Constructor Details
-
TransactionalSchedulerContext
public TransactionalSchedulerContext()
-
-
Method Details
-
start
public void start()Description copied from interface:SchedulerContext
Starts thisSchedulerContext
.- Specified by:
start
in interfaceSchedulerContext
-
stop
public void stop()Description copied from interface:SchedulerContext
Stops thisSchedulerContext
.- Specified by:
stop
in interfaceSchedulerContext
-
resume
Description copied from interface:SchedulerContext
Resumes the supplied task with theTaskId
supplying multiple results to the destination.- Specified by:
resume
in interfaceSchedulerContext
- Parameters:
taskId
- theTaskId
of the supplied taskresults
- zero or more results from resuming the task
-
resumeTaskAfterDelay
Description copied from interface:SchedulerContext
Resumes the task associated with the suppliedTaskId
. This allows for the specification of a delay after a specified period of time.- Specified by:
resumeTaskAfterDelay
in interfaceSchedulerContext
- Parameters:
taskId
- theTaskId
of the tasktime
- the time delaytimeUnit
- theTimeUnit
instance designating the time units of measure
-
resumeFromNetwork
Description copied from interface:SchedulerContext
Resumes a task that was waiting on a network call.- Specified by:
resumeFromNetwork
in interfaceSchedulerContext
- Parameters:
taskId
- the uniqueTaskId
associated with the networkresult
- the result of the network operation, passed to the task
-
resumeWithError
Description copied from interface:SchedulerContext
Resumes 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:
resumeWithError
in interfaceSchedulerContext
- Parameters:
taskId
- the uniqueTaskId
associated with the networkthrowable
- the error in the blocked operation
-
getResourceService
-
setResourceService
-
getSimpleSchedulerContext
-
setSimpleSchedulerContext
-
getPersistence
-
setPersistence
-