Class MscExecutorService
- java.lang.Object
-
- org.camunda.bpm.container.impl.jboss.service.MscExecutorService
-
- All Implemented Interfaces:
ExecutorService,org.jboss.msc.Service,org.jboss.msc.service.Service<MscExecutorService>,org.jboss.msc.value.Value<MscExecutorService>
public class MscExecutorService extends Object implements org.jboss.msc.service.Service<MscExecutorService>, ExecutorService
-
-
Constructor Summary
Constructors Constructor Description MscExecutorService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RunnablegetExecuteJobsRunnable(List<String> jobIds, ProcessEngineImpl processEngine)Returns a runnable to be used for executing Jobs.org.jboss.msc.value.InjectedValue<org.jboss.as.threads.ManagedQueueExecutorService>getManagedQueueInjector()MscExecutorServicegetValue()booleanschedule(Runnable runnable, boolean isLongRunning)Passes aRunnableto the runtime container for execution.protected booleanscheduleLongRunningWork(Runnable runnable)protected booleanscheduleShortRunningWork(Runnable runnable)voidstart(org.jboss.msc.service.StartContext context)voidstop(org.jboss.msc.service.StopContext context)
-
-
-
Method Detail
-
getValue
public MscExecutorService getValue() throws IllegalStateException, IllegalArgumentException
- Specified by:
getValuein interfaceorg.jboss.msc.value.Value<MscExecutorService>- Throws:
IllegalStateExceptionIllegalArgumentException
-
start
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException- Specified by:
startin interfaceorg.jboss.msc.Service- Specified by:
startin interfaceorg.jboss.msc.service.Service<MscExecutorService>- Throws:
org.jboss.msc.service.StartException
-
stop
public void stop(org.jboss.msc.service.StopContext context)
- Specified by:
stopin interfaceorg.jboss.msc.Service- Specified by:
stopin interfaceorg.jboss.msc.service.Service<MscExecutorService>
-
getExecuteJobsRunnable
public Runnable getExecuteJobsRunnable(List<String> jobIds, ProcessEngineImpl processEngine)
Description copied from interface:ExecutorServiceReturns a runnable to be used for executing Jobs.
- Specified by:
getExecuteJobsRunnablein interfaceExecutorService- Returns:
-
schedule
public boolean schedule(Runnable runnable, boolean isLongRunning)
Description copied from interface:ExecutorServicePasses a
Runnableto the runtime container for execution. Some runtime containers (like a Java EE container offer container provided infrastructure for executing background work (such as a JCA WorkManager). This method allows the process engine to take advantage of container infrastructure for doing background work.- Specified by:
schedulein interfaceExecutorService- Parameters:
runnable- theRunnableto be executed.isLongRunning- indicates whether the runnable is a daemon.- Returns:
- true if the runnable could be successfully scheduled for execution. 'false' otherwise.
-
scheduleShortRunningWork
protected boolean scheduleShortRunningWork(Runnable runnable)
-
scheduleLongRunningWork
protected boolean scheduleLongRunningWork(Runnable runnable)
-
getManagedQueueInjector
public org.jboss.msc.value.InjectedValue<org.jboss.as.threads.ManagedQueueExecutorService> getManagedQueueInjector()
-
-