return transState.getOngoingStateValue(attributeQuark);
}
+ @Override
+ public long getOngoingStartTime(int attribute)
+ throws AttributeNotFoundException {
+ return transState.getOngoingStartTime(attribute);
+ }
+
@Override
public void updateOngoingState(ITmfStateValue newValue, int attributeQuark)
throws AttributeNotFoundException {
transState.changeOngoingStateValue(attributeQuark, newValue);
}
-
-
//--------------------------------------------------------------------------
// Regular query methods (sent to the back-end)
//--------------------------------------------------------------------------
return latestTime;
}
- ITmfStateValue getOngoingStateValue(int index)
- throws AttributeNotFoundException {
-
+ ITmfStateValue getOngoingStateValue(int index) throws AttributeNotFoundException {
checkValidAttribute(index);
return ongoingStateInfo.get(index);
}
+ long getOngoingStartTime(int index) throws AttributeNotFoundException {
+ checkValidAttribute(index);
+ return ongoingStateStartTimes.get(index);
+ }
+
void changeOngoingStateValue(int index, ITmfStateValue newValue)
throws AttributeNotFoundException {
-
checkValidAttribute(index);
ongoingStateInfo.set(index, newValue);
}
* @param quark
* @throws AttributeNotFoundException
*/
- ITmfStateInterval getOngoingInterval(int quark)
- throws AttributeNotFoundException {
-
+ ITmfStateInterval getOngoingInterval(int quark) throws AttributeNotFoundException {
checkValidAttribute(quark);
return new TmfStateInterval(ongoingStateStartTimes.get(quark), -1, quark,
ongoingStateInfo.get(quark));
}
- private void checkValidAttribute(int quark)
- throws AttributeNotFoundException {
-
+ private void checkValidAttribute(int quark) throws AttributeNotFoundException {
if (quark > ongoingStateInfo.size() - 1 || quark < 0) {
throw new AttributeNotFoundException();
}
public ITmfStateValue queryOngoingState(int attributeQuark)
throws AttributeNotFoundException;
+ /**
+ * Get the start time of the current ongoing state, for the specified
+ * attribute.
+ *
+ * @param attribute
+ * Quark of the attribute
+ * @return The current start time of the ongoing state
+ * @throws AttributeNotFoundException
+ * If the attribute is invalid
+ */
+ public long getOngoingStartTime(int attribute)
+ throws AttributeNotFoundException;
+
/**
* Load the complete state information at time 't' into the returned List.
* You can then get the intervals for single attributes by using