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

Interface ITimeSyncedIterator

src/query/expression/ITimeSyncedIterator.java:22–89  ·  view source on GitHub ↗

An interface for expressions or queries that operate across time series and require point-by-point timestamp synchronization. @since 2.3

Source from the content-addressed store, hash-verified

20 * @since 2.3
21 */
22public interface ITimeSyncedIterator {
23
24 /** @return true if any of the series in the set has another value */
25 public boolean hasNext();
26
27 /**
28 * @param timestamp The timestamp to fastforward to
29 * @return The data point array for the given timestamp. Implementations
30 * may throw an exception if the timestamp is invliad or they may return an
31 * empty array.
32 */
33 public ExpressionDataPoint[] next(final long timestamp);
34
35 /**
36 * Determines whether the individual series in the {@link values} array has
37 * another value. This may be used for non-synchronous iteration.
38 * @param index The index of the series in the values array to check for
39 * @return True if the series has another value, false if not
40 */
41 public boolean hasNext(final int index);
42
43 /**
44 * Fetches the next value for an individual series in the {@link values} array.
45 * @param index The index of the series in the values array to advance
46 */
47 public void next(final int index);
48
49 /**
50 * @return the next timestamp available in this set.
51 */
52 public long nextTimestamp();
53
54 /** @return the number of series in this set */
55 public int size();
56
57 /** @return an array of the emitters populated during iteration */
58 public ExpressionDataPoint[] values();
59
60 /** @param index the index to null. Nulls the given object so we don't use it
61 * in timestamps.
62 */
63 public void nullIterator(final int index);
64
65 /** @return the index in the ExpressionIterator */
66 public int getIndex();
67
68 /** @param index the index in the ExpressionIterator */
69 public void setIndex(final int index);
70
71 /** @return the ID of this set given by the user */
72 public String getId();
73
74 /** @return a set of unique tag key UIDs from the filter list. If no filters
75 * were defined then the set may be empty. */
76 public ByteSet getQueryTagKs();
77
78 /** @param policy A fill policy for the iterator. Iterators should implement a default */
79 public void setFillPolicy(final NumericFillPolicy policy);

Callers 55

getCopyMethod · 0.95
compileMethod · 0.95
getCopyMethod · 0.95
compileMethod · 0.95
getCopyMethod · 0.95
computeIntersectionMethod · 0.95
computeUnionMethod · 0.95
getRowKeyUIDRegexMethod · 0.65
buildFuzzyFiltersMethod · 0.65
getRowKeyTSUIDRegexMethod · 0.65
evaluateMethod · 0.65

Implementers 4

TimeSyncedIteratorsrc/query/expression/TimeSyncedIterato
ExpressionIteratorsrc/query/expression/ExpressionIterato
IntersectionIteratorsrc/query/expression/IntersectionItera
UnionIteratorsrc/query/expression/UnionIterator.jav

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…