Class AggrTable

java.lang.Object
com.nt.udc.aggregator.AggregatorModule
com.nt.udc.aggregator.table.AggrTable

public class AggrTable extends AggregatorModule
Currently, this class handles the table functionality of an aggregator. For the most part, this is just table-related procedures, including access, initialization and shutdown.
  • Constructor Details

    • AggrTable

      public AggrTable(ConfigIfc config, LoggerIfc logger, Factory factory, File scratchDir)
      Creates the base object.
      Parameters:
      table - Active record storage table.
  • Method Details

    • getConfigData

      protected void getConfigData()
      Description copied from class: AggregatorModule
      This method should obtain the necessary information from the config class, in order to configure the module.
      Specified by:
      getConfigData in class AggregatorModule
    • open

      public void open()
      Opens the table.
    • close

      public void close()
      Closes the table
    • recordInitFields

      public int[] recordInitFields()
      Returns the fields needed by a new record, where those fields are managed by this object.
      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()
      Shuts down this object.
      Specified by:
      shutdown in class AggregatorModule
    • get

      public NAR get(NARKey key)
      Gets a NAR from the table according to the given key.
      Parameters:
      key - Key of the NAR in the table
      Returns:
      NAR, according to the given key
    • put

      public void put(NARKey key, NAR record)
      Puts a NAR into the table, according to the given key.
      Parameters:
      key - Index of the NAR
      record - NAR to put
    • remove

      public NAR remove(NARKey key)
      Removes a NAR from the table, and returns the element at the key.
      Parameters:
      key - Key of the record to remove ggerIfc.SF_RES_ERR_ENT_CREATE
      Returns:
      record at the key, or NULL if no record was found
    • keys

      public Enumeration keys()
      Keys of all the records in the table
      Returns:
      Enumeration of all the keys
    • containsKey

      public boolean containsKey(NARKey key)
      Returns whether a given key exists in the table
      Parameters:
      key - Key to look for
      Returns:
      true, if the key exists
    • isHealthy

      public boolean isHealthy()