Class LongRollingWAvgOperator.Context

All Implemented Interfaces:
SafeCloseable, AutoCloseable
Enclosing class:
LongRollingWAvgOperator

protected class LongRollingWAvgOperator.Context extends BaseDoubleUpdateByOperator.Context
  • Field Details

    • influencerValuesChunk

      protected LongChunk<? extends Values> influencerValuesChunk
  • Constructor Details

    • Context

      protected Context(int affectedChunkSize, int influencerChunkSize)
  • Method Details

    • setValueChunks

      public void setValueChunks(@NotNull @NotNull Chunk<? extends Values>[] valueChunks)
    • push

      public void push(int pos, int count)
      Description copied from class: UpdateByOperator.Context
      Add values to the operators current data set
      Specified by:
      push in class UpdateByOperator.Context
      Parameters:
      pos - the index in the associated chunk where this value can be found. Depending on the usage, might be a values chunk (for cumulative operators) or an influencer values chunk (for windowed). It is the task of the operator to pull the data from the chunk and use it properly
      count - the number of items to push from the chunk
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface SafeCloseable
      Overrides:
      close in class BaseDoubleUpdateByOperator.Context
    • pop

      public void pop(int count)
      Description copied from class: UpdateByOperator.Context
      Remove values from the operators current data set. This is only valid for windowed operators as cumulative operators only append values
      Overrides:
      pop in class UpdateByOperator.Context
      Parameters:
      count - the number of items to pop from the data set
    • writeToOutputChunk

      public void writeToOutputChunk(int outIdx)
      Description copied from class: UpdateByOperator.Context
      Write the current value for this row to the output chunk
      Overrides:
      writeToOutputChunk in class BaseDoubleUpdateByOperator.Context
    • reset

      public void reset()
      Description copied from class: UpdateByOperator.Context
      Reset the operator data values to a known state. This may occur during initialization or when a windowed operator has an empty window
      Overrides:
      reset in class BaseDoubleUpdateByOperator.Context