Interface SegmentReader

  • All Known Implementing Classes:
    CachingSegmentReader

    public interface SegmentReader
    Instances of SegmentReader are responsible for reading records from segments.

    Passing a record id that cannot be resolved to any of the read methods will eventually result in a SegmentNotFoundException. Implementations are however free to choose to defer such an exception. For example by returning cached data or a thunk to a specific record such that the exception is only thrown when actually accessing the returned record.

    The behaviour of the read methods is implementation specific when passing a record id that does not match the type of the expected record.