Package org.apache.druid.segment
Class QueryableIndexSegment
- java.lang.Object
-
- org.apache.druid.segment.QueryableIndexSegment
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Segment
public class QueryableIndexSegment extends Object implements Segment
-
-
Constructor Summary
Constructors Constructor Description QueryableIndexSegment(QueryableIndex index, SegmentId segmentId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tas(Class<T> clazz)Request an implementation of a particular interface.QueryableIndexasQueryableIndex()StorageAdapterasStorageAdapter()voidclose()org.joda.time.IntervalgetDataInterval()SegmentIdgetId()
-
-
-
Constructor Detail
-
QueryableIndexSegment
public QueryableIndexSegment(QueryableIndex index, SegmentId segmentId)
-
-
Method Detail
-
getDataInterval
public org.joda.time.Interval getDataInterval()
- Specified by:
getDataIntervalin interfaceSegment
-
asQueryableIndex
public QueryableIndex asQueryableIndex()
- Specified by:
asQueryableIndexin interfaceSegment
-
asStorageAdapter
public StorageAdapter asStorageAdapter()
- Specified by:
asStorageAdapterin interfaceSegment
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
as
@Nullable public <T> T as(@Nonnull Class<T> clazz)
Description copied from interface:SegmentRequest an implementation of a particular interface. If the passed-in interface isQueryableIndexorStorageAdapter, then this method behaves identically toSegment.asQueryableIndex()orSegment.asStorageAdapter(). Other interfaces are only expected to be requested by callers that have specific knowledge of extra features provided by specific segment types. For example, an extension might provide a custom Segment type that can offer both StorageAdapter and some new interface. That extension can also offer a Query that uses that new interface. Implementations which accept classes other thanQueryableIndexorStorageAdapterare limited to using those classes within the extension. This means that one extension cannot rely on the `Segment.as` behavior of another extension.
-
-