IndexReader.ClosedListener (Lucene 10.5.1 core API)
Description: declaration: package: org.apache.lucene.index, class: IndexReader, interface: ClosedListener

Package org.apache.lucene.index

# Interface IndexReader.ClosedListener

Enclosing class:
  `IndexReader`

Functional Interface:
  This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface IndexReader.ClosedListener
A listener that is called when a resource gets closed.

WARNING: This API is experimental and might change in incompatible ways in the next release.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `onClose(IndexReader.CacheKey key)`
  Invoked when the resource (segment core, or index reader) that is being cached on is closed.

- ## Method Details

  - ### onClose

    void onClose(IndexReader.CacheKey key) throws IOException
    Invoked when the resource (segment core, or index reader) that is being cached on is closed.
    Throws:
      `IOException`