Package binaryFileStorage
Class BinarySettingsStorage
java.lang.Object
binaryFileStorage.BinarySettingsStorage
- All Implemented Interfaces:
PamSettingsSource
Manage storage and retrieval of PAMGUARD serialised settings storage in
binary files.
- Author:
- Doug
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Get the number of different settings within the settings source.getSettings
(int settingsIndex) Get a specific PamSettingsGroupGet a name for the settings sourcevoid
boolean
saveEndSettings
(long timeNow) Save settings when processing ends.boolean
saveStartSettings
(long timeStamp) Save the settings in some vaguely sensible format.
-
Constructor Details
-
BinarySettingsStorage
-
-
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 interfacePamSettingsSource
- 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 interfacePamSettingsSource
- 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 interfacePamSettingsSource
- Returns:
- the number of PamSettingsGroups.
-
getSettings
Description copied from interface:PamSettingsSource
Get a specific PamSettingsGroup- Specified by:
getSettings
in interfacePamSettingsSource
- Parameters:
settingsIndex
- index of group- Returns:
- a settings group
-
makeSettingsMap
public void makeSettingsMap() -
getSettingsSourceName
Description copied from interface:PamSettingsSource
Get a name for the settings source- Specified by:
getSettingsSourceName
in interfacePamSettingsSource
- Returns:
- a name
-