ShapeFieldCacheProvider (Lucene 10.5.0 spatial-extras API)
Description: declaration: package: org.apache.lucene.spatial.util, class: ShapeFieldCacheProvider

Package org.apache.lucene.spatial.util

# Class ShapeFieldCacheProvider<T extends org.locationtech.spatial4j.shape.Shape>

java.lang.Object
org.apache.lucene.spatial.util.ShapeFieldCacheProvider<T>

Direct Known Subclasses:
  `PointPrefixTreeFieldCacheProvider`

public abstract class ShapeFieldCacheProvider<T extends org.locationtech.spatial4j.shape.Shape> extends Object
Provides access to a `ShapeFieldCache` for a given `LeafReader`.

If a Cache does not exist for the Reader, then it is built by iterating over the all terms for a given field, reconstructing the Shape from them, and adding them to the Cache.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final int`
  `defaultSize`
  `protected final String`
  `shapeField`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ShapeFieldCacheProvider(String shapeField, int defaultSize)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ShapeFieldCache<T>`
  `getCache(LeafReader reader)`
  `protected abstract T`
  `readShape(BytesRef term)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### defaultSize

    protected final int defaultSize

  - ### shapeField

    protected final String shapeField

- ## Constructor Details

  - ### ShapeFieldCacheProvider

    public ShapeFieldCacheProvider(String shapeField, int defaultSize)

- ## Method Details

  - ### readShape

    protected abstract T readShape(BytesRef term)

  - ### getCache

    public ShapeFieldCache<T> getCache(LeafReader reader) throws IOException
    Throws:
      `IOException`