Class PagesSpatialIndexFactory


  • @ThreadSafe
    public class PagesSpatialIndexFactory
    extends Object
    This factory is used to pass spatial index built by SpatialIndexBuilderOperator to SpatialJoinOperators.

    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.