|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ode.il.MockScheduler
public class MockScheduler
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.ode.bpel.iapi.Scheduler |
---|
Scheduler.JobInfo, Scheduler.JobProcessor, Scheduler.JobProcessorException, Scheduler.MapSerializableRunnable, Scheduler.Synchronizer |
Constructor Summary | |
---|---|
MockScheduler()
|
|
MockScheduler(javax.transaction.TransactionManager txm)
|
Method Summary | ||
---|---|---|
void |
beginTransaction()
|
|
void |
cancelJob(java.lang.String arg0)
Make a good effort to cancel the job. |
|
void |
commitTransaction()
|
|
|
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. |
|
boolean |
isTransacted()
|
|
void |
registerSynchronizer(Scheduler.Synchronizer synch)
Register a transaction synchronizer. |
|
void |
rollbackTransaction()
|
|
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(java.util.Map<java.lang.String,java.lang.Object> detail,
java.util.Date date)
Schedule a persisted job. |
|
java.lang.String |
scheduleVolatileJob(boolean transacted,
java.util.Map<java.lang.String,java.lang.Object> detail)
Schedule a volatile (non-persisted) job. |
|
void |
setExecutorSvc(java.util.concurrent.ExecutorService executorSvc)
|
|
void |
setJobProcessor(Scheduler.JobProcessor processor)
|
|
void |
setPolledRunnableProcesser(Scheduler.JobProcessor delegatedRunnableProcessor)
|
|
void |
setRollbackOnly()
|
|
void |
shutdown()
|
|
void |
start()
|
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MockScheduler()
public MockScheduler(javax.transaction.TransactionManager txm)
Method Detail |
---|
public java.lang.String schedulePersistedJob(java.util.Map<java.lang.String,java.lang.Object> detail, java.util.Date date) throws ContextException
Scheduler
schedulePersistedJob
in interface Scheduler
detail
- information about the jobdate
- when the job should run (null
means now)
ContextException
public java.lang.String scheduleVolatileJob(boolean transacted, java.util.Map<java.lang.String,java.lang.Object> detail) throws ContextException
Scheduler
scheduleVolatileJob
in interface Scheduler
detail
- information about the job
ContextException
public java.lang.String scheduleMapSerializableRunnable(Scheduler.MapSerializableRunnable runnable, java.util.Date when) throws ContextException
Scheduler
scheduleMapSerializableRunnable
in interface Scheduler
ContextException
public void cancelJob(java.lang.String arg0) throws ContextException
Scheduler
cancelJob
in interface Scheduler
arg0
- 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 void setRollbackOnly() throws java.lang.Exception
setRollbackOnly
in interface Scheduler
java.lang.Exception
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 boolean isTransacted()
isTransacted
in interface Scheduler
public void start()
start
in interface Scheduler
public void stop()
stop
in interface Scheduler
public void shutdown()
shutdown
in interface Scheduler
public void registerSynchronizer(Scheduler.Synchronizer synch) throws ContextException
Scheduler
registerSynchronizer
in interface Scheduler
synch
- synchronizer
ContextException
public void beginTransaction()
public void commitTransaction()
public void rollbackTransaction()
public void setJobProcessor(Scheduler.JobProcessor processor) throws ContextException
setJobProcessor
in interface Scheduler
ContextException
public void setExecutorSvc(java.util.concurrent.ExecutorService executorSvc)
public void setPolledRunnableProcesser(Scheduler.JobProcessor delegatedRunnableProcessor)
setPolledRunnableProcesser
in interface Scheduler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |