Class MeterLogManager

  • All Implemented Interfaces:
    Session

    public class MeterLogManager
    extends AbstractManager
    Author:
    Daniel Meyer
    • Field Detail

      • SELECT_METER_INTERVAL

        public static final java.lang.String SELECT_METER_INTERVAL
        See Also:
        Constant Field Values
      • SELECT_METER_SUM

        public static final java.lang.String SELECT_METER_SUM
        See Also:
        Constant Field Values
      • DELETE_ALL_METER

        public static final java.lang.String DELETE_ALL_METER
        See Also:
        Constant Field Values
      • DELETE_ALL_METER_BY_TIMESTAMP_AND_REPORTER

        public static final java.lang.String DELETE_ALL_METER_BY_TIMESTAMP_AND_REPORTER
        See Also:
        Constant Field Values
      • SELECT_UNIQUE_TASK_WORKER

        public static final java.lang.String SELECT_UNIQUE_TASK_WORKER
        See Also:
        Constant Field Values
      • SELECT_TASK_METER_FOR_CLEANUP

        public static final java.lang.String SELECT_TASK_METER_FOR_CLEANUP
        See Also:
        Constant Field Values
      • DELETE_TASK_METER_BY_TIMESTAMP

        public static final java.lang.String DELETE_TASK_METER_BY_TIMESTAMP
        See Also:
        Constant Field Values
      • DELETE_TASK_METER_BY_REMOVAL_TIME

        public static final java.lang.String DELETE_TASK_METER_BY_REMOVAL_TIME
        See Also:
        Constant Field Values
      • DELETE_TASK_METER_BY_IDS

        public static final java.lang.String DELETE_TASK_METER_BY_IDS
        See Also:
        Constant Field Values
    • Constructor Detail

      • MeterLogManager

        public MeterLogManager()
    • Method Detail

      • executeSelectSum

        public java.lang.Long executeSelectSum​(MetricsQueryImpl query)
      • isEndTimeAfterLastReportInterval

        protected boolean isEndTimeAfterLastReportInterval​(MetricsQueryImpl query)
      • shouldAddCurrentUnloggedCount

        protected boolean shouldAddCurrentUnloggedCount​(MetricsQueryImpl query)
      • deleteAll

        public void deleteAll()
      • deleteByTimestampAndReporter

        public void deleteByTimestampAndReporter​(java.util.Date timestamp,
                                                 java.lang.String reporter)
      • findUniqueTaskWorkerCount

        public long findUniqueTaskWorkerCount​(java.util.Date startTime,
                                              java.util.Date endTime)
      • deleteTaskMetricsByTimestamp

        public void deleteTaskMetricsByTimestamp​(java.util.Date timestamp)
      • deleteTaskMetricsById

        public void deleteTaskMetricsById​(java.util.List<java.lang.String> taskMetricIds)
      • deleteTaskMetricsByRemovalTime

        public DbOperation deleteTaskMetricsByRemovalTime​(java.util.Date currentTimestamp,
                                                          java.lang.Integer timeToLive,
                                                          int minuteFrom,
                                                          int minuteTo,
                                                          int batchSize)
      • findTaskMetricsForCleanup

        public java.util.List<java.lang.String> findTaskMetricsForCleanup​(int batchSize,
                                                                          java.lang.Integer timeToLive,
                                                                          int minuteFrom,
                                                                          int minuteTo)