Class SegmentDataManager
- java.lang.Object
-
- org.apache.pinot.segment.local.data.manager.SegmentDataManager
-
public abstract class SegmentDataManager extends Object
Base segment data manager to maintain reference count for the segment.
-
-
Constructor Summary
Constructors Constructor Description SegmentDataManager()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleandecreaseReferenceCount()Decreases the reference count.voiddestroy()Destroys the data manager and releases all the resources allocated.protected abstract voiddoDestroy()longgetLoadTimeMs()intgetReferenceCount()abstract IndexSegmentgetSegment()abstract StringgetSegmentName()booleanincreaseReferenceCount()Increases the reference count.
-
-
-
Method Detail
-
getLoadTimeMs
public long getLoadTimeMs()
-
getReferenceCount
public int getReferenceCount()
-
increaseReferenceCount
public boolean increaseReferenceCount()
Increases the reference count. Should be called when acquiring the segment.- Returns:
- Whether the segment is still valid (i.e. reference count not 0)
-
decreaseReferenceCount
public boolean decreaseReferenceCount()
Decreases the reference count. Should be called when releasing or dropping the segment.- Returns:
- Whether the segment can be destroyed (i.e. reference count is 0)
-
getSegmentName
public abstract String getSegmentName()
-
getSegment
public abstract IndexSegment getSegment()
-
destroy
public void destroy()
Destroys the data manager and releases all the resources allocated. The data manager can only be destroyed once.
-
doDestroy
protected abstract void doDestroy()
-
-