Class TileOpExecutor.WriteWork<A>
java.lang.Object
org.apache.sis.internal.coverage.j2d.TileOpExecutor.Worker<WritableRenderedImage,WritableRaster,A>
org.apache.sis.internal.coverage.j2d.TileOpExecutor.WriteWork<A>
- Type Parameters:
A
- type of the thread-local object (the accumulator) for holding intermediate results.
- All Implemented Interfaces:
Runnable
- Enclosing class:
- TileOpExecutor
private static final class TileOpExecutor.WriteWork<A>
extends TileOpExecutor.Worker<WritableRenderedImage,WritableRaster,A>
Worker which will write tiles. Exactly one
WriteWork
instance is created for each thread
which will perform the operation on WritableRaster
tiles. The same WriteWork
instance can process an arbitrary number of tiles.-
Field Summary
Fields inherited from class org.apache.sis.internal.coverage.j2d.TileOpExecutor.Worker
accumulator, cursor, processor, tx, ty
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
WriteWork
(TileOpExecutor.Cursor<WritableRenderedImage, A> cursor, Collector<? super WritableRaster, A, ?> collector) Creates a new worker for traversing the tiles identified by the given cursor. -
Method Summary
Modifier and TypeMethodDescription(package private) static <A,
R> R execute
(TileOpExecutor executor, WritableRenderedImage target, Collector<? super WritableRaster, A, R> collector, TileErrorHandler errorHandler) Implementation ofTileOpExecutor.executeOnWritable(WritableRenderedImage, Collector)
.protected void
Invoked byTileOpExecutor.Worker.run()
for processing the tile at current indices.Methods inherited from class org.apache.sis.internal.coverage.j2d.TileOpExecutor.Worker
rethrowOrWrap, run
-
Constructor Details
-
WriteWork
private WriteWork(TileOpExecutor.Cursor<WritableRenderedImage, A> cursor, Collector<? super WritableRaster, A, ?> collector) Creates a new worker for traversing the tiles identified by the given cursor.- Parameters:
cursor
- iterator over the indices of the tiles to fetch.collector
- provides the process to execute on each tile.
-
-
Method Details
-
executeOnCurrentTile
protected void executeOnCurrentTile()Invoked byTileOpExecutor.Worker.run()
for processing the tile at current indices.- Specified by:
executeOnCurrentTile
in classTileOpExecutor.Worker<WritableRenderedImage,
WritableRaster, A> - Throws:
RuntimeException
- if any error occurred during the process.
-
execute
static <A,R> R execute(TileOpExecutor executor, WritableRenderedImage target, Collector<? super WritableRaster, A, R> collector, TileErrorHandler errorHandler) Implementation ofTileOpExecutor.executeOnWritable(WritableRenderedImage, Collector)
. See the Javadoc of that method for details.
-