Package org.apache.druid.segment
Class SegmentReference
java.lang.Object
org.apache.druid.segment.SegmentReference
- All Implemented Interfaces:
Closeable,AutoCloseable
Wrapper for a
SegmentDescriptor and Optional<Segment>, the latter being created by a
SegmentMapFunction being applied to a ReferenceCountedSegmentProvider. Closing this object closes
both the segmentReference and any closeables attached from the process of creating this object, such as
from AcquireSegmentAction-
Constructor Summary
ConstructorsConstructorDescriptionSegmentReference(SegmentDescriptor segmentDescriptor, Optional<Segment> segmentReference, Closeable cleanupHold) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static SegmentReferencemissing(SegmentDescriptor segmentDescriptor)
-
Constructor Details
-
SegmentReference
public SegmentReference(SegmentDescriptor segmentDescriptor, Optional<Segment> segmentReference, @Nullable Closeable cleanupHold)
-
-
Method Details
-
missing
-
getSegmentDescriptor
-
getSegmentReference
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-