org.torweg.pulse.component.statistics.aggregator.task
Class CleanupPIRecordsTask
java.lang.Object
org.torweg.pulse.component.statistics.aggregator.task.CleanupPIRecordsTask
- All Implemented Interfaces:
- IPreAggregationAndOrPostAggregationTask
public class CleanupPIRecordsTask
- extends java.lang.Object
- implements IPreAggregationAndOrPostAggregationTask
Removes processed PIRecords for the given StatisticsServer
from the database according to the configured processing limit.
Allowed TaskExecutionModes:
TaskExecutionMode.PRE
TaskExecutionMode.POST
- Version:
- $Revision: 1571 $
- Author:
- Daniel Dietz
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CleanupPIRecordsTask
public CleanupPIRecordsTask()
execute
public final void execute(TaskExecutionMode mode, StatisticsServer statisticsServer, DataAggregationJobletConfiguration config, Bundle bundle)
- Removes processed
PIRecords for the given StatisticsServer from the database according to the configured
processing limit.
The PIRecords are being removed as follows:
- If the given
StatisticsServer server
does provide a TimeSpan keep for which
the PIRecords are to be kept, PIRecords will be removed
if:
processed < System.currentTimeMillis() - server.getKeepPIRecordsFor().getMilliseconds()
.
- If the given
StatisticsServer does not
provide a TimeSpan keep for which the PIRecords
are to be kept, all processed PIRecords for the StatisticsServer will be removed.
.
- Specified by:
execute in interface IPreAggregationAndOrPostAggregationTask
- Parameters:
mode - [UNUSED] the current TaskExecutionModestatisticsServer - the current StatisticsServerconfig - the DataAggregationJobletConfigurationbundle - [UNUSED] the current Bundle, e.g. for retrieving a
Configuration