Interface Accountable

All Known Subinterfaces:
All Known Implementing Classes:
AbstractPagedMutable, Automaton, AutomatonQuery, BitDocIdSet, BitSet, ByteBlockPool, ByteBuffersDataInput, ByteBuffersDataOutput, ByteRunAutomaton, BytesRefArray.SortState, BytesRefHash, CharacterRunAutomaton, CompiledAutomaton, DirectMonotonicReader, DirectMonotonicReader.Meta, DocIdSet, DocsWithFieldSet, FixedBitSet, FrequencyTrackingRingBuffer, FST, GrowableWriter, IndexWriter, KnnVectorsReader, LongBitSet, LRUQueryCache, LRUQueryCache.CacheAndCount, Lucene90CompressingStoredFieldsWriter, Lucene90CompressingTermVectorsWriter, Lucene91HnswVectorsReader, MonotonicBlockPackedReader, NotDocIdSet, NRTCachingDirectory, OffHeapFSTStore, OnHeapFSTStore, OrdinalMap, PackedInts.Mutable, PackedInts.NullReader, PackedInts.Reader, PackedLongValues, PackedLongValues.Builder, PagedBytes, PagedBytes.Reader, PagedGrowableWriter, PagedMutable, PerFieldKnnVectorsFormat.FieldsReader, PointInSetQuery, PrefixCodedTerms, PrefixQuery, RegexpQuery, RoaringDocIdSet, RunAutomaton, SparseFixedBitSet, StoredFieldsWriter, Term, TermInSetQuery, TermRangeQuery, TermVectorsWriter, WildcardQuery

public interface Accountable
An object whose RAM usage can be computed.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
  • Field Summary

    Modifier and Type
    static final Accountable
    An accountable that always returns 0
  • Method Summary

    Modifier and Type
    Returns nested resources of this class.
    Return the memory usage of this object in bytes.
  • Field Details


      static final Accountable NULL_ACCOUNTABLE
      An accountable that always returns 0
  • Method Details

    • ramBytesUsed

      long ramBytesUsed()
      Return the memory usage of this object in bytes. Negative values are illegal.
    • getChildResources

      default Collection<Accountable> getChildResources()
      Returns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).
      See Also: