@ThreadSafe public class PagesSpatialIndexFactory extends Object
SpatialIndexBuilderOperator creates a spatial index Supplier and provides
it to this factory by calling lendPagesSpatialIndex(Supplier).
SpatialJoinOperators call createPagesSpatialIndex() to get a Future that
will provide an instance of the spatial index when done. The Supplier
is used to create separate instances of an index for each SpatialJoinOperator. All
these instances share the index of geometries on the build side, but have their own
instances of an optional extra potentially stateful filter function.
SpatialIndexBuilderOperator is responsible for keeping track of how much memory is used by the index shared among SpatialJoinOperators. To do so SpatialIndexBuilderOperator has to stay active until all the SpatialJoinOperators have finished.
lendPagesSpatialIndex(Supplier) returns a Future that completes once all
the SpatialJoinOperators completed. SpatialIndexBuilderOperator uses that Future
to decide on its own completion.
| Constructor and Description |
|---|
PagesSpatialIndexFactory(List<Type> types,
List<Type> outputTypes) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.ListenableFuture<PagesSpatialIndex> |
createPagesSpatialIndex()
Called by
SpatialJoinOperator. |
void |
destroy() |
List<Type> |
getOutputTypes() |
List<Type> |
getTypes() |
com.google.common.util.concurrent.ListenableFuture<?> |
lendPagesSpatialIndex(Supplier<PagesSpatialIndex> pagesSpatialIndex)
Called by
SpatialIndexBuilderOperator to provide a
Supplier of spatial indexes for SpatialJoinOperators to use. |
public void destroy()
public com.google.common.util.concurrent.ListenableFuture<PagesSpatialIndex> createPagesSpatialIndex()
SpatialJoinOperator.public com.google.common.util.concurrent.ListenableFuture<?> lendPagesSpatialIndex(Supplier<PagesSpatialIndex> pagesSpatialIndex)
SpatialIndexBuilderOperator to provide a
Supplier of spatial indexes for SpatialJoinOperators to use.
Returns a Future that completes once all the SpatialJoinOperators have completed.
Copyright © 2012–2019. All rights reserved.