MCPcopy Create free account
hub / github.com/OpenTSDB/opentsdb / setStartTime

Method setStartTime

src/core/SplitRollupQuery.java:72–88  ·  view source on GitHub ↗

Sets the start time of the graph. Converts the timestamp to milliseconds if necessary. @param timestamp The start time, all the data points returned will have a timestamp greater than or equal to this one. @throws IllegalArgumentException if timestamp is less than or equal to 0,

(long timestamp)

Source from the content-addressed store, hash-verified

70 * {@code timestamp >= }{@link #getEndTime getEndTime}.
71 */
72 @Override
73 public void setStartTime(long timestamp) {
74 if ((timestamp & Const.SECOND_MASK) == 0) { timestamp *= 1000L; }
75
76 if (rollupQuery == null) {
77 rawQuery.setStartTime(timestamp);
78 return;
79 }
80
81 if (rollupQuery.getEndTime() <= timestamp) {
82 rollupQuery = null;
83 rawQuery.setStartTime(timestamp);
84 return;
85 }
86
87 rollupQuery.setStartTime(timestamp);
88 }
89
90 /**
91 * Returns the end time of the graph.

Callers

nothing calls this directly

Calls 2

setStartTimeMethod · 0.65
getEndTimeMethod · 0.65

Tested by

no test coverage detected