Interface Closeable

All Superinterfaces:
AutoCloseable, Closeable
All Known Subinterfaces:
CloseableIterator<E>, Index.Manager, IndexingStrategy, IssueIterator
All Known Implementing Classes:
CloseableBackupBuilder, CompositeCloseable, DefaultIndex, DefaultIndexEngine, DefaultIndexEngine.WriterReference, MultiThreadedIndexingStrategy, SimpleIndexingStrategy, WriterWithStats

public interface Closeable extends Closeable
A Closeable is a source or destination of data that can be closed. The close method is invoked to release resources that the object is holding (such as open files).

Straight copy of the java.util.Closeable interface except it doesn't throw IOException

Since:
v3.13
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Consumer<Closeable>
    Simple Consumer implementation that closes all elements.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes this stream and releases any system resources associated with it.
  • Field Details

  • Method Details

    • close

      void close()
      Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      RuntimeIOException - if an I/O error occurs