public interface ParallelChunkOperation
ParallelChunkOperation
interface is implemented by
classes that perform a ChunkOperation
on a set of chunk positions
in parallel.Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels a parallel operation in progress.
|
void |
init(java.util.List<ChunkPosition> positions,
ChunkOperation op)
Initializes the parallel operation.
|
void |
start()
Starts the parallel operation.
|
void |
waitForCompletion()
Waits for completion of a parallel operation.
|
void init(java.util.List<ChunkPosition> positions, ChunkOperation op)
positions
- the list of chunk positions to operate on.op
- the chunk operation to perform at each position.void start()
void cancel()
void waitForCompletion()
cancel()
was called. Otherwise
it simply waits until all operations are complete and returns.