Class LastCacheManager


  • public class LastCacheManager
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void deleteLastCacheByDevice​(IEntityMNode node)
      delete all the last cache value of any timeseries or aligned timeseries under the entity
      static void deleteLastCacheByDevice​(IEntityMNode node, org.apache.iotdb.commons.path.PartialPath originalPath, long startTime, long endTime)
      delete the last cache value of timeseries or subMeasurement of some aligned timeseries, which is under the entity and matching the originalPath
      static org.apache.iotdb.tsfile.read.TimeValuePair getLastCache​(IMeasurementMNode node)
      get the last cache value of time series of given seriesPath
      static long getLastTimeStamp​(IMeasurementMNode node, QueryContext queryContext)
      get the last value of timeseries represented by given measurementMNode get last value from cache in measurementMNode if absent, get last value from file
      static void resetLastCache​(IMeasurementMNode node)
      reset the last cache value of time series of given seriesPath
      static void updateLastCache​(IMeasurementMNode node, org.apache.iotdb.tsfile.read.TimeValuePair timeValuePair, boolean highPriorityUpdate, java.lang.Long latestFlushedTime)
      update the last cache value of time series of given seriesPath
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LastCacheManager

        public LastCacheManager()
    • Method Detail

      • getLastCache

        public static org.apache.iotdb.tsfile.read.TimeValuePair getLastCache​(IMeasurementMNode node)
        get the last cache value of time series of given seriesPath
        Parameters:
        node - the measurementMNode holding the lastCache When invoker only has the target seriesPath, the node could be null and SchemaProcessor will search the node
        Returns:
        the last cache value
      • updateLastCache

        public static void updateLastCache​(IMeasurementMNode node,
                                           org.apache.iotdb.tsfile.read.TimeValuePair timeValuePair,
                                           boolean highPriorityUpdate,
                                           java.lang.Long latestFlushedTime)
        update the last cache value of time series of given seriesPath
        Parameters:
        node - the measurementMNode holding the lastCache When invoker only has the target seriesPath, the node could be null and SchemaProcessor will search the node
        timeValuePair - the latest point value
        highPriorityUpdate - the last value from insertPlan is high priority
        latestFlushedTime - latest flushed time
      • resetLastCache

        public static void resetLastCache​(IMeasurementMNode node)
        reset the last cache value of time series of given seriesPath
        Parameters:
        node - the measurementMNode holding the lastCache When invoker only has the target seriesPath, the node could be null and SchemaProcessor will search the node
      • deleteLastCacheByDevice

        public static void deleteLastCacheByDevice​(IEntityMNode node)
        delete all the last cache value of any timeseries or aligned timeseries under the entity
        Parameters:
        node - entity node
      • deleteLastCacheByDevice

        public static void deleteLastCacheByDevice​(IEntityMNode node,
                                                   org.apache.iotdb.commons.path.PartialPath originalPath,
                                                   long startTime,
                                                   long endTime)
        delete the last cache value of timeseries or subMeasurement of some aligned timeseries, which is under the entity and matching the originalPath
        Parameters:
        node - entity node
        originalPath - origin timeseries path
        startTime - startTime
        endTime - endTime
      • getLastTimeStamp

        public static long getLastTimeStamp​(IMeasurementMNode node,
                                            QueryContext queryContext)
        get the last value of timeseries represented by given measurementMNode get last value from cache in measurementMNode if absent, get last value from file
        Parameters:
        node - measurementMNode representing the target timeseries
        queryContext - query context
        Returns:
        the last value