|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hackystat.dailyprojectdata.resource.snapshot.SensorDataSnapshot
public class SensorDataSnapshot
This class is deprecated, you should use the SensorBase REST API to retrieve snapshots. SensorDataSnapshot provides a generic means to retrieve and return the set of SensorData of a given SDT with the most recent 'runtime' value. It does this by retrieving "buckets" of data for a given interval size (defaulting to 30 minutes), starting at 11:30pm on the given day and working backward until a complete 'snapshot' has been achieved. The Snapshot algorithm is based upon a number of assumptions that may or may not be true in practice:
Constructor Summary | |
---|---|
SensorDataSnapshot(org.hackystat.sensorbase.client.SensorBaseClient client,
java.lang.String user,
java.lang.String project,
java.lang.String sdt,
org.hackystat.utilities.time.period.Day day)
Creates a new snapshot. |
|
SensorDataSnapshot(org.hackystat.sensorbase.client.SensorBaseClient client,
java.lang.String user,
java.lang.String project,
java.lang.String sdt,
org.hackystat.utilities.time.period.Day day,
int bucketSize)
Creates a new snapshot. |
|
SensorDataSnapshot(org.hackystat.sensorbase.client.SensorBaseClient client,
java.lang.String user,
java.lang.String project,
java.lang.String sdt,
org.hackystat.utilities.time.period.Day day,
int bucketSize,
java.lang.String tool)
Creates a new snapshot. |
Method Summary | |
---|---|
(package private) int |
getNumberOfBucketsRetrieved()
Gets the number of buckets that were retrieved to create the snapshot. |
java.lang.String |
getOwner()
Returns the Owner responsible for the Snapshot data, or null if there is no Snapshot data. |
java.lang.String |
getTool()
Returns the Tool responsible for the Snapshot data, or null if there is no Snapshot data. |
boolean |
isEmpty()
Returns true if the Snapshot contains no data. |
java.util.Iterator<org.hackystat.sensorbase.resource.sensordata.jaxb.SensorData> |
iterator()
Returns an iterator over the last SensorData snapshot. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SensorDataSnapshot(org.hackystat.sensorbase.client.SensorBaseClient client, java.lang.String user, java.lang.String project, java.lang.String sdt, org.hackystat.utilities.time.period.Day day) throws org.hackystat.sensorbase.client.SensorBaseClientException
client
- The SensorBaseClient
to be used for querying for
SensorData
.user
- The Hackystat user that owns the Project whose data is being retrieved.project
- The project to obtain data for.sdt
- The sensor data type to get data for.day
- The day to get the latest snapshot for.
org.hackystat.sensorbase.client.SensorBaseClientException
- Thrown if there is an error while communication with the
sensorbase server.public SensorDataSnapshot(org.hackystat.sensorbase.client.SensorBaseClient client, java.lang.String user, java.lang.String project, java.lang.String sdt, org.hackystat.utilities.time.period.Day day, int bucketSize) throws org.hackystat.sensorbase.client.SensorBaseClientException
client
- The SensorBaseClient
to be used for querying for
SensorData
.user
- The Hackystat user that owns the Project whose data is being retrieved.project
- The project to obtain data for.sdt
- The sensor data type to get data for.day
- The day to get the latest snapshot for.bucketSize
- The interval of time (in minutes) in which data should be retrieved from
the server.
org.hackystat.sensorbase.client.SensorBaseClientException
- Thrown if there is an error while communication with the
sensorbase server.public SensorDataSnapshot(org.hackystat.sensorbase.client.SensorBaseClient client, java.lang.String user, java.lang.String project, java.lang.String sdt, org.hackystat.utilities.time.period.Day day, int bucketSize, java.lang.String tool) throws org.hackystat.sensorbase.client.SensorBaseClientException
client
- The SensorBaseClient
to be used for querying for
SensorData
.user
- The Hackystat user that owns the Project whose data is being retrieved.project
- The project to obtain data for.sdt
- The sensor data type to get data for.day
- The day to get the latest snapshot for.bucketSize
- The interval of time (in minutes) in which data should be retrieved from
the server.tool
- The tool that data should be retrieved for.
org.hackystat.sensorbase.client.SensorBaseClientException
- Thrown if there is an error while communication with the
sensorbase server.Method Detail |
---|
public java.util.Iterator<org.hackystat.sensorbase.resource.sensordata.jaxb.SensorData> iterator()
SensorData
snapshot.
iterator
in interface java.lang.Iterable<org.hackystat.sensorbase.resource.sensordata.jaxb.SensorData>
SensorData
snapshot.public java.lang.String getOwner()
public java.lang.String getTool()
public boolean isEmpty()
int getNumberOfBucketsRetrieved()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |