public class MscExecutorService extends Object implements org.jboss.msc.service.Service<MscExecutorService>, ExecutorService
Constructor and Description |
---|
MscExecutorService() |
Modifier and Type | Method and Description |
---|---|
Runnable |
getExecuteJobsRunnable(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() |
MscExecutorService |
getValue() |
boolean |
schedule(Runnable runnable,
boolean isLongRunning)
Passes a
Runnable to the runtime container for execution. |
protected boolean |
scheduleLongRunningWork(Runnable runnable) |
protected boolean |
scheduleShortRunningWork(Runnable runnable) |
void |
start(org.jboss.msc.service.StartContext context) |
void |
stop(org.jboss.msc.service.StopContext context) |
public MscExecutorService getValue() throws IllegalStateException, IllegalArgumentException
getValue
in interface org.jboss.msc.value.Value<MscExecutorService>
IllegalStateException
IllegalArgumentException
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException
start
in interface org.jboss.msc.service.Service<MscExecutorService>
org.jboss.msc.service.StartException
public void stop(org.jboss.msc.service.StopContext context)
stop
in interface org.jboss.msc.service.Service<MscExecutorService>
public Runnable getExecuteJobsRunnable(List<String> jobIds, ProcessEngineImpl processEngine)
ExecutorService
Returns a runnable to be used for executing Jobs.
getExecuteJobsRunnable
in interface ExecutorService
public boolean schedule(Runnable runnable, boolean isLongRunning)
ExecutorService
Passes a Runnable
to 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.
schedule
in interface ExecutorService
runnable
- the Runnable
to be executed.isLongRunning
- indicates whether the runnable is a daemon.protected boolean scheduleShortRunningWork(Runnable runnable)
protected boolean scheduleLongRunningWork(Runnable runnable)
public org.jboss.msc.value.InjectedValue<org.jboss.as.threads.ManagedQueueExecutorService> getManagedQueueInjector()
Copyright © 2017. All rights reserved.