Class ReferenceCountedSegmentProvider.UnmanagedReference

java.lang.Object
org.apache.druid.segment.ReferenceCountedSegmentProvider.LeafReference
org.apache.druid.segment.ReferenceCountedSegmentProvider.UnmanagedReference
All Implemented Interfaces:
Closeable, AutoCloseable, Segment
Enclosing class:
ReferenceCountedSegmentProvider

public static final class ReferenceCountedSegmentProvider.UnmanagedReference extends ReferenceCountedSegmentProvider.LeafReference
  • Constructor Details

    • UnmanagedReference

      public UnmanagedReference(Segment delegate)
  • Method Details

    • as

      @Nullable public <T> T as(@Nonnull Class<T> clazz)
      Description copied from interface: Segment
      Request an implementation of a particular interface.

      All implementations of this method should be able to provide a CursorFactory. 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 CursorFactory and some new interface. That extension can also offer a Query that uses that new interface.

      Implementations which accept classes other than known built-in interfaces such as CursorFactory are limited to using those classes within the extension. This means that one extension cannot rely on the `Segment.as` behavior of another extension.

      Type Parameters:
      T - desired interface
      Parameters:
      clazz - desired interface
      Returns:
      instance of clazz, or null if the interface is not supported by this segment, one of the following:
    • close

      public void close()