Class AggrShifter

java.lang.Object
com.nt.udc.aggregator.AggregatorModule
com.nt.udc.aggregator.util.AggrShifter

public class AggrShifter extends AggregatorModule
This class handles those fields that need to be moved, or shifted, from one field id to another field id. This is done with a simple factor value which is added to the field id when shifting occurs. Shifting occurs conditionally, when a certain field matches the pre-configured value.
  • Field Details

    • shift_factor

      protected int shift_factor
    • shiftAttrs

      protected int[] shiftAttrs
    • shiftAttrID

      protected int shiftAttrID
    • shiftAttrValue

      protected String shiftAttrValue
  • Constructor Details

    • AggrShifter

      public AggrShifter(ConfigIfc config, LoggerIfc logger)
      Creates a shifter object with the configuration and logger objects.
  • Method Details

    • getConfigData

      protected void getConfigData()
      Gets the shifting-related rules
      Specified by:
      getConfigData in class AggregatorModule
    • recordInitFields

      public int[] recordInitFields()
      Returns those fields needed by a newly created record
      Specified by:
      recordInitFields in class AggregatorModule
      Returns:
      Field ID's to include in a new record that is inserted into the table.
    • shutdown

      public void shutdown()
      Performs shutdown procedures.
      Specified by:
      shutdown in class AggregatorModule
    • needShift

      public boolean needShift(NAR nar)
      Checks if the given NAR needs shifting.
      Parameters:
      nar - NAR to check
      Returns:
      true, if this record needs shifting
    • shift

      public void shift(NAR nar)
      Shifts the appropriate fields of the given NAR by the configured shift factor.
      Parameters:
      nar - NAR to shift