Modifier and Type | Field and Description |
---|---|
static int |
PRUNE_WINDOW
The window to get the measurements.
|
Constructor and Description |
---|
MeasurementPruner(ServerProperties properties,
String gcdId,
String orgId,
boolean debug)
Create a MeasurementGarbageCollector.
|
Modifier and Type | Method and Description |
---|---|
MeasurementPruningDefinition |
getDefinition() |
List<Measurement> |
getMeasurementsToDelete() |
WattDepotPersistence |
getPersistance() |
static void |
main(String[] args)
Processes the command line arguments and runs the
MeasurementGarbageCollector one time.
|
void |
pruneMeasurements()
Prunes the measurements.
|
void |
run() |
cancel, scheduledExecutionTime
public static final int PRUNE_WINDOW
public MeasurementPruner(ServerProperties properties, String gcdId, String orgId, boolean debug) throws Exception
properties
- The ServerProperties that define the type of persistence.gcdId
- The id of the MeasurementPruningDefintion.orgId
- The id of the Organization.debug
- true if want debugging information.Exception
- If there is a problem instantiating the
WattDepotPersistence.public MeasurementPruningDefinition getDefinition()
public List<Measurement> getMeasurementsToDelete() throws IdNotFoundException
IdNotFoundException
- if there is a problem with the
MeasurementPruningDefinition.public WattDepotPersistence getPersistance()
public static void main(String[] args) throws Exception
args
- The command line arguments.Exception
- if there is a problem.public void pruneMeasurements() throws DatatypeConfigurationException, IdNotFoundException
DatatypeConfigurationException
- if there is a problem with
DateConvert.IdNotFoundException
- if there is a problem with persistence.Copyright © 2015 Collaborative Software Development Laboratory. All rights reserved.