Interface ColumnRegionObjectWithLength<T,ATTR extends Any>

All Superinterfaces:
ChunkSource<ATTR>, ColumnRegion<ATTR>, ColumnRegionObject<T,ATTR>, DefaultChunkSource<ATTR>, FillContextMaker, GetContextMaker, Page<ATTR>, PagingChunkSource<ATTR>, PushdownFilterMatcher, RegionedPushdownFilterMatcher, Releasable
All Known Implementing Classes:
ColumnRegionObjectCached, ColumnRegionObjectCodecFixed, ColumnRegionObjectCodecVariable

public interface ColumnRegionObjectWithLength<T,ATTR extends Any> extends ColumnRegionObject<T,ATTR>
A ColumnRegionObject that supports querying its length.
  • Method Details

    • lengthItems

      default Optional<Long> lengthItems()
      Get the number of objects that can be read from this region, if it is known. Otherwise, return an empty optional.

      The returned length is safe to use as a read extent: every object it covers is guaranteed to be dereferenceable. Implementations backed by more than one file must not report objects whose bytes are not yet visible, even if some other file claims they exist -- see DH-23322.

    • lengthItems

      static Optional<Long> lengthItems(ColumnRegionObject<?,?> region)
      Get the number of objects that can be read from this region, if it is known.
      Parameters:
      region - the region to query
      Returns:
      the number of readable objects if known, otherwise an empty optional