Class FlushConditions

java.lang.Object
com.nt.udc.aggregator.util.FlushConditions

public class FlushConditions extends Object
This class implements some simple conditions that check whether a certain record (or set of records) need to be flushed from the table.
  • Constructor Details

    • FlushConditions

      public FlushConditions(AggrConfig config, LoggerIfc logger, AggrTable table, File traceFile)
      Creates an object to handle the flushing conditions
  • Method Details

    • recordInitFields

      public int[] recordInitFields()
      Returns the fields that should be stored in a newly created record entry. The fields returned are those that this object uses/knows about.
      Returns:
      Array of integers, representing the fields to initialize.
    • shutdown

      public void shutdown()
    • checkFinishedRecord

      public boolean checkFinishedRecord(NAR nar)
      Checks if the given record should be removed from the table, based on two configuration items: "FinishAttrID" and "FinishValue". If these items match the field and value of the given record, then return true.
      Parameters:
      nar - NAR to check
      Returns:
      true, if record matches the criteria
    • checkRecordSetFlush

      public NARKey[] checkRecordSetFlush(NAR nar)
      This method finds those records of a set, where the set is defined by a field in the given NAR. The field that defines the set is defined by the configuration setting "FlushSetDefAttrID". The configuration settings that determine whether to do a set-based flush are "FlushSetAttrID" and "FlushSetValue".
      Parameters:
      nar - NAR, which is used to determine whether to do the set based flush, and used to define the set
      Returns:
      Set of keys to index the NAR's in the set
    • checkImmediateFlush

      public boolean checkImmediateFlush(NAR nar)
      Checks the immediate record flush criteria, as defined by the configuration settings "ImmediateFinishAttrID" and "ImmediateFinishValue".
      Parameters:
      nar - NAR to check for immediate flush
      Returns:
      true, if needs immediate flush
    • getConfigData

      protected void getConfigData()