Wanted to get this in before the API freezes...
Rename loadStateAtTime() -> queryFullState(). Originally this
would simply seek an inner vector to the given location, now
it actually returns that vector. It's more in line with the
other query*() methods.
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
int quark, valueInt;
String valueStr;
- list = ssb.loadStateAtTime(interestingTimestamp1);
+ list = ssb.queryFullState(interestingTimestamp1);
quark = ssb.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
interval = list.get(quark);
@Test(expected = TimeRangeException.class)
public void testFullQueryInvalidTime1() throws TimeRangeException {
long ts = CtfTestFiles.startTime + 20L * CtfTestFiles.NANOSECS_PER_SEC;
- ssb.loadStateAtTime(ts);
+ ssb.queryFullState(ts);
}
@Test(expected = TimeRangeException.class)
public void testFullQueryInvalidTime2() throws TimeRangeException {
long ts = CtfTestFiles.startTime - 20L * CtfTestFiles.NANOSECS_PER_SEC;
- ssb.loadStateAtTime(ts);
+ ssb.queryFullState(ts);
}
ITmfStateInterval interval;
int quark;
- list = ssb.loadStateAtTime(interestingTimestamp1);
+ list = ssb.queryFullState(interestingTimestamp1);
quark = ssb.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
interval = list.get(quark);
ITmfStateInterval interval;
int quark;
- list = ssb.loadStateAtTime(interestingTimestamp1);
+ list = ssb.queryFullState(interestingTimestamp1);
quark = ssb.getQuarkAbsolute(Attributes.THREADS, "1432", Attributes.EXEC_NAME);
interval = list.get(quark);
*/
@Override
- public synchronized List<ITmfStateInterval> loadStateAtTime(long t)
+ public synchronized List<ITmfStateInterval> queryFullState(long t)
throws TimeRangeException {
List<ITmfStateInterval> stateInfo = new ArrayList<ITmfStateInterval>(
attributeTree.getNbAttributes());
* If the 't' parameter is outside of the range of the state
* history.
*/
- public List<ITmfStateInterval> loadStateAtTime(long t)
+ public List<ITmfStateInterval> queryFullState(long t)
throws TimeRangeException;
/**
* Singular query method. This one does not update the whole stateInfo
- * vector, like loadStateAtTimes() does. It only searches for one specific
+ * vector, like queryFullState() does. It only searches for one specific
* entry in the state history.
*
* It should be used when you only want very few entries, instead of the
* whole state (or many entries, but all at different timestamps). If you do
* request many entries all at the same time, you should use the
- * conventional loadStateAtTime() + List.get() method.
+ * conventional queryFullState() + List.get() method.
*
* @param t
* The timestamp at which we want the state
* attribute between timestamps t1 and t2. The list will be ordered by
* ascending time.
*
- * Note that contrary to loadStateAtTime(), the returned list here is in the
+ * Note that contrary to queryFullState(), the returned list here is in the
* "direction" of time (and not in the direction of attributes, as is the
- * case with loadStateAtTime()).
+ * case with queryFullState()).
*
* @param attributeQuark
* Which attribute this query is interested in