MCPcopy
hub / github.com/OpenTSDB/opentsdb / next

Method next

src/query/expression/TimeSyncedIterator.java:124–144  ·  view source on GitHub ↗
(final long timestamp)

Source from the content-addressed store, hash-verified

122 }
123
124 @Override
125 public ExpressionDataPoint[] next(final long timestamp) {
126 for (int i = 0; i < current_values.length; i++) {
127 if (current_values[i] == null) {
128 emitter_values[i].reset(timestamp, fill_policy.getValue());
129 continue;
130 }
131
132 if (current_values[i].timestamp() > timestamp) {
133 emitter_values[i].reset(timestamp, fill_policy.getValue());
134 } else {
135 emitter_values[i].reset(current_values[i]);
136 if (!iterators[i].hasNext()) {
137 current_values[i] = null;
138 } else {
139 current_values[i] = iterators[i].next();
140 }
141 }
142 }
143 return emitter_values;
144 }
145
146 @Override
147 public long nextTimestamp() {

Callers 11

threeSeriesMethod · 0.95
threeSeriesEmitterMethod · 0.95
nullASeriesMethod · 0.95
singleSeriesMethod · 0.95
threeSeriesMissingMethod · 0.95
failToNextTSMethod · 0.95
getCopyMethod · 0.95

Calls 5

timestampMethod · 0.65
hasNextMethod · 0.65
nextMethod · 0.65
resetMethod · 0.45
getValueMethod · 0.45

Tested by 11

threeSeriesMethod · 0.76
threeSeriesEmitterMethod · 0.76
nullASeriesMethod · 0.76
singleSeriesMethod · 0.76
threeSeriesMissingMethod · 0.76
failToNextTSMethod · 0.76
getCopyMethod · 0.76