Class BlockContext
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,Object>
com.inductiveautomation.ignition.gateway.sqltags.history.query.processing.BlockContext
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
Object>
A BlockContext provides some information about a specific aggregation "block", or window of time,
but it also provides a spot for aggregation functions to store data for the window, if they want.
It also provides a series of useful functions for aggregation functions.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionBlockContext
(long blockStart, long blockEnd, int blockId, QualifiedValue prevRaw, QualifiedValue[] prevRes) -
Method Summary
Modifier and TypeMethodDescriptionlong
int
Returns an integer that roughly corresponds to the rowid of the result that this block would represent.long
boolean
insideBlock
(long time) boolean
insideBlock
(Date time) Returns the results from the previous aggregation functionReturns the last raw value received previous to this block.void
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
BlockContext
public BlockContext(long blockStart, long blockEnd, int blockId, QualifiedValue prevRaw, QualifiedValue[] prevRes)
-
-
Method Details
-
getBlockId
public int getBlockId()Returns an integer that roughly corresponds to the rowid of the result that this block would represent. It is "roughly" because it doesn't take into account aggregates that return multiple values for one block. -
getBlockTimestamp
-
getBlockStart
public long getBlockStart() -
getBlockEnd
public long getBlockEnd() -
previousRawValue
Returns the last raw value received previous to this block. -
previousBlockResults
Returns the results from the previous aggregation function -
insideBlock
public boolean insideBlock(long time) -
insideBlock
-
get
-
setReturn
-
getReturnValue
-