Class DataPruneMaintenanceTask
- java.lang.Object
-
- com.inductiveautomation.gateway.tags.history.maintentance.DataPruneMaintenanceTask
-
- All Implemented Interfaces:
SelfSchedulingRunnable
,java.lang.Runnable
- Direct Known Subclasses:
ParitionDropMaintenanceTask
public abstract class DataPruneMaintenanceTask extends java.lang.Object implements SelfSchedulingRunnable
This is a maintenance task that deletes data from tag history after a certain amount of time.
-
-
Constructor Summary
Constructors Constructor Description DataPruneMaintenanceTask(GatewayContext context, int age, TimeUnits units)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
executeDelete()
END SELF-SCHEDULING RUNNABLE CODEprotected long
getAgeMillis()
Gets the age to delete in milliseconds.GatewayContext
getContext()
org.apache.log4j.Logger
getLogger()
long
getNextExecDelayMillis()
SELF-SCHEDULING RUNNABLE CODEvoid
run()
void
setController(SchedulingController controller)
Called by the execution engine, passes in a scheduling controller that the self scheduling runnable can use to request a reschedule.
-
-
-
Constructor Detail
-
DataPruneMaintenanceTask
public DataPruneMaintenanceTask(GatewayContext context, int age, TimeUnits units)
-
-
Method Detail
-
getAgeMillis
protected long getAgeMillis()
Gets the age to delete in milliseconds.
-
getLogger
public org.apache.log4j.Logger getLogger()
-
getContext
public GatewayContext getContext()
-
getNextExecDelayMillis
public long getNextExecDelayMillis()
SELF-SCHEDULING RUNNABLE CODE- Specified by:
getNextExecDelayMillis
in interfaceSelfSchedulingRunnable
- Returns:
- Time to wait until next exec. 0 indicates that the unit should not be executed, and the engine should just wait for a reschedule request.
-
setController
public void setController(SchedulingController controller)
Description copied from interface:SelfSchedulingRunnable
Called by the execution engine, passes in a scheduling controller that the self scheduling runnable can use to request a reschedule.- Specified by:
setController
in interfaceSelfSchedulingRunnable
- Parameters:
controller
- the scheduling controller which is to be used to request the reschuled run
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
executeDelete
protected abstract void executeDelete() throws java.lang.Exception
END SELF-SCHEDULING RUNNABLE CODE- Throws:
java.lang.Exception
-
-