|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ode.bpel.engine.replayer.ReplayerScheduler
public class ReplayerScheduler
Manages events invocation in sorted order during replaying.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.ode.bpel.iapi.Scheduler |
---|
Scheduler.JobDetails, Scheduler.JobInfo, Scheduler.JobProcessor, Scheduler.JobProcessorException, Scheduler.JobType, Scheduler.MapSerializableRunnable, Scheduler.Synchronizer |
Field Summary | |
---|---|
static java.lang.ThreadLocal<org.apache.ode.bpel.engine.replayer.ReplayerScheduler.TaskElement> |
currentTaskElement
|
Replayer |
replayer
|
Constructor Summary | |
---|---|
ReplayerScheduler()
|
Method Summary | ||
---|---|---|
void |
cancelJob(java.lang.String jobId)
Make a good effort to cancel the job. |
|
|
execIsolatedTransaction(java.util.concurrent.Callable<T> transaction)
Same as execTransaction but executes in a different thread to guarantee isolation from the main execution thread. |
|
|
execTransaction(java.util.concurrent.Callable<T> transaction)
Execute a Callable in a transactional context. |
|
|
execTransaction(java.util.concurrent.Callable<T> transaction,
int timeout)
Execute a Callable in a transactional context. |
|
boolean |
isTransacted()
|
|
void |
registerSynchronizer(Scheduler.Synchronizer synch)
Register a transaction synchronizer. |
|
java.lang.String |
scheduleMapSerializableRunnable(Scheduler.MapSerializableRunnable runnable,
java.util.Date when)
Schedule a Runnable that will be executed on a dedicated thread pool. |
|
java.lang.String |
schedulePersistedJob(Scheduler.JobDetails jobDetail,
java.util.Date when1)
Schedule a persisted job. |
|
void |
scheduleReplayerJob(java.util.concurrent.Callable action,
java.util.Date when,
ReplayerBpelRuntimeContextImpl runtimeContext)
|
|
java.lang.String |
scheduleVolatileJob(boolean transacted,
Scheduler.JobDetails jobDetail)
Schedule a volatile job for right now |
|
java.lang.String |
scheduleVolatileJob(boolean transacted,
Scheduler.JobDetails jobDetail,
java.util.Date when)
Schedule a volatile (non-persisted) job. |
|
void |
setJobProcessor(Scheduler.JobProcessor processor)
|
|
void |
setPolledRunnableProcesser(Scheduler.JobProcessor polledRunnableProcessor)
|
|
void |
setRollbackOnly()
|
|
void |
shutdown()
|
|
void |
start()
|
|
void |
startReplaying(Replayer replayer)
|
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Replayer replayer
public static java.lang.ThreadLocal<org.apache.ode.bpel.engine.replayer.ReplayerScheduler.TaskElement> currentTaskElement
Constructor Detail |
---|
public ReplayerScheduler()
Method Detail |
---|
public void scheduleReplayerJob(java.util.concurrent.Callable action, java.util.Date when, ReplayerBpelRuntimeContextImpl runtimeContext)
public void cancelJob(java.lang.String jobId) throws ContextException
Scheduler
cancelJob
in interface Scheduler
jobId
- job identifier of the job
ContextException
public <T> T execTransaction(java.util.concurrent.Callable<T> transaction) throws java.lang.Exception, ContextException
Scheduler
Callable
in a transactional context. If the callable
throws an exception, then the transaction will be rolled back, otherwise
the transaction will commit.
execTransaction
in interface Scheduler
T
- return typetransaction
- transaction to execute
java.lang.Exception
ContextException
public <T> T execTransaction(java.util.concurrent.Callable<T> transaction, int timeout) throws java.lang.Exception, ContextException
Scheduler
Callable
in a transactional context. If the callable
throws an exception, then the transaction will be rolled back, otherwise
the transaction will commit. Also, modify the value of the timeout value
that is associated with the transactions started by the current thread.
execTransaction
in interface Scheduler
T
- return typetransaction
- transaction to execute
java.lang.Exception
ContextException
public boolean isTransacted()
isTransacted
in interface Scheduler
public void registerSynchronizer(Scheduler.Synchronizer synch) throws ContextException
Scheduler
registerSynchronizer
in interface Scheduler
synch
- synchronizer
ContextException
public void setJobProcessor(Scheduler.JobProcessor processor) throws ContextException
setJobProcessor
in interface Scheduler
ContextException
public void setRollbackOnly() throws java.lang.Exception
setRollbackOnly
in interface Scheduler
java.lang.Exception
public void shutdown()
shutdown
in interface Scheduler
public void startReplaying(Replayer replayer) throws java.lang.Exception
java.lang.Exception
public void stop()
stop
in interface Scheduler
public void start()
start
in interface Scheduler
public <T> java.util.concurrent.Future<T> execIsolatedTransaction(java.util.concurrent.Callable<T> transaction) throws java.lang.Exception, ContextException
Scheduler
execIsolatedTransaction
in interface Scheduler
java.lang.Exception
ContextException
public java.lang.String scheduleMapSerializableRunnable(Scheduler.MapSerializableRunnable runnable, java.util.Date when) throws ContextException
Scheduler
scheduleMapSerializableRunnable
in interface Scheduler
ContextException
public java.lang.String schedulePersistedJob(Scheduler.JobDetails jobDetail, java.util.Date when1) throws ContextException
Scheduler
schedulePersistedJob
in interface Scheduler
jobDetail
- information about the jobwhen1
- when the job should run (null
means now)
ContextException
public void setPolledRunnableProcesser(Scheduler.JobProcessor polledRunnableProcessor)
setPolledRunnableProcesser
in interface Scheduler
public java.lang.String scheduleVolatileJob(boolean transacted, Scheduler.JobDetails jobDetail, java.util.Date when) throws ContextException
Scheduler
scheduleVolatileJob
in interface Scheduler
transacted
- should the job be executed in a transaction?jobDetail
- information about the jobwhen
- does the job should be executed?
ContextException
public java.lang.String scheduleVolatileJob(boolean transacted, Scheduler.JobDetails jobDetail) throws ContextException
Scheduler
scheduleVolatileJob
in interface Scheduler
ContextException
#scheduleVolatileJob(boolean, java.util.Map, java.util.Date)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |