public interface SegmentLoader
SegmentCacheManager. Implementations must be thread-safe.| Modifier and Type | Method and Description |
|---|---|
void |
cleanup(DataSegment segment)
cleanup any state used by this segment
|
ReferenceCountingSegment |
getSegment(DataSegment segment,
boolean lazy,
SegmentLazyLoadFailCallback loadFailed)
Returns a
ReferenceCountingSegment that will be added by the SegmentManager
to the VersionedIntervalTimeline. |
void |
loadSegmentIntoPageCache(DataSegment segment,
ExecutorService exec)
Asyncly load segment into page cache.
|
ReferenceCountingSegment getSegment(DataSegment segment, boolean lazy, SegmentLazyLoadFailCallback loadFailed) throws SegmentLoadingException
ReferenceCountingSegment that will be added by the SegmentManager
to the VersionedIntervalTimeline. This method can be called multiple times
by the SegmentManager and implementation can either return same ReferenceCountingSegment
or a different ReferenceCountingSegment. Caller should not assume any particular behavior.
Returning a ReferenceCountingSegment will let custom implementations keep track of reference count for
segments that the custom implementations are creating. That way, custom implementations can know when the segment
is in use or not.segment - - Segment to loadlazy - - Whether column metadata de-serialization is to be deferred to access time. Setting this flag to true can speed up segment loadingloadFailed - - Callback to invoke if lazy loading fails during column access.SegmentLoadingException - - If there is an error in loading the segmentvoid cleanup(DataSegment segment)
void loadSegmentIntoPageCache(DataSegment segment, ExecutorService exec)
segment - The segment to load its index files into page cacheexec - The thread pool to useCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.