Class FixedChunkSizePlanner
- java.lang.Object
-
- org.hortonmachine.gears.libs.modules.multiprocessing.ExecutionPlanner
-
- org.hortonmachine.gears.libs.modules.multiprocessing.FixedChunkSizePlanner
-
public class FixedChunkSizePlanner extends ExecutionPlanner
- Author:
- Falko Bräutigam
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_CHUNK_SIZEThe absolut upper limit of the chunk size.-
Fields inherited from class org.hortonmachine.gears.libs.modules.multiprocessing.ExecutionPlanner
defaultExecutor, defaultPlannerFactory, numberOfTasks
-
-
Constructor Summary
Constructors Constructor Description FixedChunkSizePlanner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidhandleException(Exception e)voidjoin()Blocks the calling thread until all sumitted task have completed execution.voidsubmit(MultiProcessingTask task)Submits the given task for execution.protected voidsubmitChunk(List<MultiProcessingTask> chunk)-
Methods inherited from class org.hortonmachine.gears.libs.modules.multiprocessing.ExecutionPlanner
createDefaultPlanner, setNumberOfTasks
-
-
-
-
Field Detail
-
MAX_CHUNK_SIZE
public static final int MAX_CHUNK_SIZE
The absolut upper limit of the chunk size.- See Also:
- Constant Field Values
-
-
Method Detail
-
submit
public void submit(MultiProcessingTask task)
Description copied from class:ExecutionPlannerSubmits the given task for execution.- Specified by:
submitin classExecutionPlanner
-
submitChunk
protected void submitChunk(List<MultiProcessingTask> chunk)
-
handleException
protected void handleException(Exception e)
-
join
public void join() throws ExceptionDescription copied from class:ExecutionPlannerBlocks the calling thread until all sumitted task have completed execution.- Specified by:
joinin classExecutionPlanner- Throws:
Exception- If a previously submitted task has thrown an exception then it is re-thrown by the join() method.
-
-