public class SegmentManager extends Object
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
SegmentManager.DataSourceState
Represent the state of a data source including the timeline, total segment size, and number of segments. 
 | 
| Constructor and Description | 
|---|
SegmentManager(SegmentLoader segmentLoader)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
dropSegment(DataSegment segment)  | 
Map<String,Long> | 
getDataSourceCounts()
Returns a map of dataSource to the number of segments managed by this segmentManager. 
 | 
Map<String,Long> | 
getDataSourceSizes()
Returns a map of dataSource to the total byte size of segments managed by this segmentManager. 
 | 
VersionedIntervalTimeline<String,ReferenceCountingSegment> | 
getTimeline(String dataSource)  | 
boolean | 
isSegmentCached(DataSegment segment)  | 
boolean | 
loadSegment(DataSegment segment)
Load a single segment. 
 | 
@Inject public SegmentManager(SegmentLoader segmentLoader)
public Map<String,Long> getDataSourceSizes()
public Map<String,Long> getDataSourceCounts()
public boolean isSegmentCached(DataSegment segment) throws SegmentLoadingException
SegmentLoadingException@Nullable public VersionedIntervalTimeline<String,ReferenceCountingSegment> getTimeline(String dataSource)
public boolean loadSegment(DataSegment segment) throws SegmentLoadingException
segment - segment to loadSegmentLoadingException - if the segment cannot be loadedpublic void dropSegment(DataSegment segment) throws SegmentLoadingException
SegmentLoadingExceptionCopyright © 2011–2018. All rights reserved.