Class TileOpExecutor.ReadWork<A>
java.lang.Object
org.apache.sis.internal.coverage.j2d.TileOpExecutor.Worker<RenderedImage,Raster,A>
org.apache.sis.internal.coverage.j2d.TileOpExecutor.ReadWork<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.ReadWork<A>
extends TileOpExecutor.Worker<RenderedImage,Raster,A>
Worker which will read tiles. Exactly one
ReadWork
instance is created for each thread
which will perform the computation on Raster
tiles. The same ReadWork
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
ReadWork
(TileOpExecutor.Cursor<RenderedImage, A> cursor, Collector<? super Raster, 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, RenderedImage source, Collector<? super Raster, A, R> collector, TileErrorHandler errorHandler) Implementation ofTileOpExecutor.executeOnReadable(RenderedImage, 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
-
ReadWork
private ReadWork(TileOpExecutor.Cursor<RenderedImage, A> cursor, Collector<? super Raster, 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<RenderedImage,
Raster, A> - Throws:
RuntimeException
- if any error occurred during the process.
-
execute
static <A,R> R execute(TileOpExecutor executor, RenderedImage source, Collector<? super Raster, A, R> collector, TileErrorHandler errorHandler) Implementation ofTileOpExecutor.executeOnReadable(RenderedImage, Collector)
. See the Javadoc of that method for details.
-