Interface LargeValueStore

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
DiskBackedList

public interface LargeValueStore extends Closeable
Interface for handling large collections that may need to be stored on disk to avoid memory exhaustion.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes this store and releases any associated resources (e.g., temp files).
    get(int index)
    Returns the element at the specified index.
    Returns an iterator over the elements in this store.
    int
    Returns the number of elements in this store.
  • Method Details

    • size

      int size()
      Returns the number of elements in this store.
    • get

      Object get(int index)
      Returns the element at the specified index.
      Parameters:
      index - the index of the element to return
      Returns:
      the element at the specified position
      Throws:
      IndexOutOfBoundsException - if index is out of range
    • iterator

      Iterator<Object> iterator()
      Returns an iterator over the elements in this store.
    • close

      void close()
      Closes this store and releases any associated resources (e.g., temp files).
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable