Class SegmentDataManager


  • public abstract class SegmentDataManager
    extends Object
    Base segment data manager to maintain reference count for the segment.
    • Constructor Detail

      • SegmentDataManager

        public SegmentDataManager()
    • 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()
      • 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()