Package org.apache.druid.segment.loading
Class AcquireSegmentResult
java.lang.Object
org.apache.druid.segment.loading.AcquireSegmentResult
Wraps a
ReferenceCountedObjectProvider<Segment> with additional measurements about segment loading, if it
was required-
Constructor Summary
ConstructorsConstructorDescriptionAcquireSegmentResult(ReferenceCountedObjectProvider<Segment> referenceProvider, long loadSizeBytes, long waitTimeNanos, long loadTimeNanos) -
Method Summary
Modifier and TypeMethodDescriptionstatic AcquireSegmentResultcached(ReferenceCountedObjectProvider<Segment> provider) static AcquireSegmentResultempty()longAmount of data loaded into the cache, or 0 if it was already available in the cachelongAmount of time spent loading a segment, or 0 if the segment was already available in the cacheSegment reference provider for loaded segmentlongAmount of time spent waiting before actually loading the segment (e.g.
-
Constructor Details
-
AcquireSegmentResult
public AcquireSegmentResult(ReferenceCountedObjectProvider<Segment> referenceProvider, long loadSizeBytes, long waitTimeNanos, long loadTimeNanos)
-
-
Method Details
-
empty
-
cached
-
getReferenceProvider
Segment reference provider for loaded segment -
getLoadSizeBytes
public long getLoadSizeBytes()Amount of data loaded into the cache, or 0 if it was already available in the cache -
getWaitTimeNanos
public long getWaitTimeNanos()Amount of time spent waiting before actually loading the segment (e.g. if loads are done on a shared thread pool) -
getLoadTimeNanos
public long getLoadTimeNanos()Amount of time spent loading a segment, or 0 if the segment was already available in the cache
-