Class BlockContext

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,​java.lang.Object>

    public class BlockContext
    extends java.util.HashMap<java.lang.String,​java.lang.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:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object get​(java.lang.String key, java.lang.Object def)  
      long getBlockEnd()  
      int getBlockId()
      Returns an integer that roughly corresponds to the rowid of the result that this block would represent.
      long getBlockStart()  
      java.util.Date getBlockTimestamp()  
      java.lang.Object getReturnValue()  
      boolean insideBlock​(long time)  
      boolean insideBlock​(java.util.Date time)  
      QualifiedValue[] previousBlockResults()
      Returns the results from the previous aggregation function
      QualifiedValue previousRawValue()
      Returns the last raw value received previous to this block.
      void setReturn​(java.lang.Object object)  
      • 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
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        equals, hashCode
    • Constructor Detail

    • Method Detail

      • 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

        public java.util.Date getBlockTimestamp()
      • getBlockStart

        public long getBlockStart()
      • getBlockEnd

        public long getBlockEnd()
      • previousRawValue

        public QualifiedValue previousRawValue()
        Returns the last raw value received previous to this block.
      • previousBlockResults

        public QualifiedValue[] previousBlockResults()
        Returns the results from the previous aggregation function
      • insideBlock

        public boolean insideBlock​(long time)
      • insideBlock

        public boolean insideBlock​(java.util.Date time)
      • get

        public java.lang.Object get​(java.lang.String key,
                                    java.lang.Object def)
      • setReturn

        public void setReturn​(java.lang.Object object)
      • getReturnValue

        public java.lang.Object getReturnValue()