Class BinarySettingsStorage

java.lang.Object
binaryFileStorage.BinarySettingsStorage
All Implemented Interfaces:
PamSettingsSource

public class BinarySettingsStorage extends Object implements PamSettingsSource
Manage storage and retrieval of PAMGUARD serialised settings storage in binary files.
Author:
Doug
  • Constructor Details

    • BinarySettingsStorage

      public BinarySettingsStorage(BinaryStore binaryStore)
  • Method Details

    • saveStartSettings

      public boolean saveStartSettings(long timeStamp)
      Save the settings in some vaguely sensible format. This will be different to the main settings stores since a) they are crap b) I want to include a list of modules in a format which can be read by anything, so that other software can at least work out which modules were present without having to decode the serialised java objects.
      Specified by:
      saveStartSettings in interface PamSettingsSource
      Parameters:
      timeStamp - current time in milliseconds
      Returns:
      true if saved correctly
    • saveEndSettings

      public boolean saveEndSettings(long timeNow)
      Description copied from interface: PamSettingsSource
      Save settings when processing ends. This may just be an update of the settings saves with saveStartSettings, e.g. an end time.
      Specified by:
      saveEndSettings in interface PamSettingsSource
      Returns:
      true if saved correctly.
    • getNumSettings

      public int getNumSettings()
      Description copied from interface: PamSettingsSource
      Get the number of different settings within the settings source.
      Specified by:
      getNumSettings in interface PamSettingsSource
      Returns:
      the number of PamSettingsGroups.
    • getSettings

      public PamSettingsGroup getSettings(int settingsIndex)
      Description copied from interface: PamSettingsSource
      Get a specific PamSettingsGroup
      Specified by:
      getSettings in interface PamSettingsSource
      Parameters:
      settingsIndex - index of group
      Returns:
      a settings group
    • makeSettingsMap

      public void makeSettingsMap()
    • getSettingsSourceName

      public String getSettingsSourceName()
      Description copied from interface: PamSettingsSource
      Get a name for the settings source
      Specified by:
      getSettingsSourceName in interface PamSettingsSource
      Returns:
      a name