public class FireHydrant extends Object
| Constructor and Description |
|---|
FireHydrant(IncrementalIndex index,
int count,
SegmentId segmentId) |
FireHydrant(Segment adapter,
int count) |
| Modifier and Type | Method and Description |
|---|---|
Pair<ReferenceCountingSegment,Closeable> |
getAndIncrementSegment() |
int |
getCount() |
ReferenceCountingSegment |
getHydrantSegment() |
ReferenceCountingSegment |
getIncrementedSegment() |
IncrementalIndex |
getIndex() |
org.joda.time.Interval |
getSegmentDataInterval() |
Optional<Pair<SegmentReference,Closeable>> |
getSegmentForQuery(Function<SegmentReference,SegmentReference> segmentMapFn)
This method is like a combined form of
getIncrementedSegment() and getAndIncrementSegment() that
deals in SegmentReference instead of directly with ReferenceCountingSegment in order to acquire
reference count for both hydrant's segment and any tracked joinables taking part in the query. |
SegmentId |
getSegmentId() |
boolean |
hasSwapped() |
void |
swapSegment(Segment newSegment) |
String |
toString() |
public FireHydrant(IncrementalIndex index, int count, SegmentId segmentId)
public FireHydrant(Segment adapter, int count)
public IncrementalIndex getIndex()
public SegmentId getSegmentId()
public org.joda.time.Interval getSegmentDataInterval()
public int getCount()
public boolean hasSwapped()
public ReferenceCountingSegment getIncrementedSegment()
public Pair<ReferenceCountingSegment,Closeable> getAndIncrementSegment()
public Optional<Pair<SegmentReference,Closeable>> getSegmentForQuery(Function<SegmentReference,SegmentReference> segmentMapFn)
getIncrementedSegment() and getAndIncrementSegment() that
deals in SegmentReference instead of directly with ReferenceCountingSegment in order to acquire
reference count for both hydrant's segment and any tracked joinables taking part in the query.public ReferenceCountingSegment getHydrantSegment()
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.