code: public Segment loadSegment(long segmentId, long segmentVersion) {
      switch (storage.level()) {
        case MEMORY:
          return loadMemorySegment(segmentId, segmentVersion);
        case MAPPED:
          return loadMappedSegment(segmentId, segmentVersion);
        case DISK:
          return loadDiskSegment(segmentId, segmentVersion);
        default:
          throw new AssertionError();
      }
    }
docs: Loads a segment.