org.hackystat.sensor.xmldata.option
Class UniqueTstampOption

java.lang.Object
  extended by org.hackystat.sensor.xmldata.option.AbstractOption
      extended by org.hackystat.sensor.xmldata.option.UniqueTstampOption
All Implemented Interfaces:
Option

public class UniqueTstampOption
extends AbstractOption

The option used to alter the "Timestmap" attribute in the sensor data files to ensure uniqueness. This removes the data collision problem due to entries having the same timstamps, but the cost is that the sensor/client-side will lose information about what timestamps are actually being sent to the server.

Author:
aito

Field Summary
static java.lang.String OPTION_NAME
          The option name, which is "-uniqueTimestamps".
 
Constructor Summary
UniqueTstampOption(XmlDataController controller, java.util.List<java.lang.String> parameters)
          Creates this option with the specified controller and the specified list of parameters.
 
Method Summary
 boolean isValid()
          Returns true if the list of parameters contains no parameters.
 void process()
          Processes this option by setting the unique timestamps mode to true.
 
Methods inherited from class org.hackystat.sensor.xmldata.option.AbstractOption
execute, getController, getName, getParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPTION_NAME

public static final java.lang.String OPTION_NAME
The option name, which is "-uniqueTimestamps".

See Also:
Constant Field Values
Constructor Detail

UniqueTstampOption

public UniqueTstampOption(XmlDataController controller,
                          java.util.List<java.lang.String> parameters)
Creates this option with the specified controller and the specified list of parameters.

Parameters:
controller - the specified controller.
parameters - the specified list of parameters.
Method Detail

process

public void process()
Processes this option by setting the unique timestamps mode to true.

Specified by:
process in interface Option
Overrides:
process in class AbstractOption

isValid

public boolean isValid()
Returns true if the list of parameters contains no parameters.

Specified by:
isValid in interface Option
Specified by:
isValid in class AbstractOption
Returns:
true if this option has no parameters, false if not.