Package noaa.coastwatch.util.chunk
Interface ParallelChunkOperation
- All Known Implementing Classes:
PoolProcessor
public interface ParallelChunkOperation
The
ParallelChunkOperation interface is implemented by
classes that perform a ChunkOperation on a set of chunk positions
in parallel.- Since:
- 3.4.0
- Author:
- Peter Hollemans
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Cancels a parallel operation in progress.voidinit(List<ChunkPosition> positions, ChunkOperation op) Initializes the parallel operation.voidstart()Starts the parallel operation.voidWaits for completion of a parallel operation.
-
Method Details
-
init
Initializes the parallel operation.- Parameters:
positions- the list of chunk positions to operate on.op- the chunk operation to perform at each position.
-
start
void start()Starts the parallel operation. -
cancel
void cancel()Cancels a parallel operation in progress. Some instances of chunk operations in progress may take time to complete, but no more operations are started after the call to this method. -
waitForCompletion
void waitForCompletion()Waits for completion of a parallel operation. If the parallel operation has been cancelled, this method will also wait for any chunk operations that were already in progress whencancel()was called. Otherwise it simply waits until all operations are complete and returns.
-