org.oddjob.scheduling
Class ExecutorThrottleType
java.lang.Object
org.oddjob.scheduling.ExecutorThrottleType
- All Implemented Interfaces:
- ArooaValue, ValueFactory<ExecutorService>
public class ExecutorThrottleType
- extends Object
- implements ValueFactory<ExecutorService>
Description
Throttle parallel execution. This will limit the
number of jobs running in parallel.
Example
Throttling parallel execution.
<oddjob>
<job>
<parallel id="parallel">
<executorService>
<throttle limit="2"/>
</executorService>
<jobs>
<wait name="Wait 1"/>
<wait name="Wait 2"/>
<wait name="Wait 3"/>
<wait name="Wait 4"/>
</jobs>
</parallel>
</job>
</oddjob>
- Author:
- rob
ExecutorThrottleType
public ExecutorThrottleType()
toValue
public ExecutorService toValue()
throws ArooaConversionException
- Description copied from interface:
ValueFactory
- Provide an instance of the type this is a factory for.
- Specified by:
toValue
in interface ValueFactory<ExecutorService>
- Returns:
- An instance of the type. May be null.
- Throws:
ArooaConversionException
- If unable to provide a value.
getLimit
public int getLimit()
setLimit
public void setLimit(int max)
getOriginal
public ExecutorService getOriginal()
setOriginal
@Inject
public void setOriginal(ExecutorService original)
toString
public String toString()
- Overrides:
toString
in class Object