public class QueryableIndexSegment extends Object implements Segment
| Constructor and Description |
|---|
QueryableIndexSegment(QueryableIndex index,
SegmentId segmentId) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
as(Class<T> clazz)
Request an implementation of a particular interface.
|
QueryableIndex |
asQueryableIndex() |
StorageAdapter |
asStorageAdapter() |
void |
close() |
org.joda.time.Interval |
getDataInterval() |
SegmentId |
getId() |
public QueryableIndexSegment(QueryableIndex index, SegmentId segmentId)
public org.joda.time.Interval getDataInterval()
getDataInterval in interface Segmentpublic QueryableIndex asQueryableIndex()
asQueryableIndex in interface Segmentpublic StorageAdapter asStorageAdapter()
asStorageAdapter in interface Segmentpublic void close()
close in interface Closeableclose in interface AutoCloseable@Nullable public <T> T as(@Nonnull Class<T> clazz)
SegmentQueryableIndex or StorageAdapter, then this method behaves
identically to Segment.asQueryableIndex() or Segment.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 than QueryableIndex or StorageAdapter are limited
to using those classes within the extension. This means that one extension cannot rely on the `Segment.as`
behavior of another extension.Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.