Package PamguardMVC.uid
Class UIDOnlineManager
java.lang.Object
PamguardMVC.uid.UIDOnlineManager
- All Implemented Interfaces:
 UIDManager
Class for managing UID's during real time operations. Basic functions that 
 will be needed are to retrieve latest UIDs from the database and binary store at start up 
 and to work out methods of storing id's persistently between runs and if / when PAMGUard crashes
 without correctly saving UID's.
- Author:
 - dg50
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleanCalled just before PAMGurd exits, at the same time that config data are written to the psf, etc.booleanFinds largest UID for each PamDataBlock.voidsynchUIDs(boolean onlyNewDataBlocks) Loop through the data blocks and try to find matching database and binary file UID information. 
- 
Constructor Details
- 
UIDOnlineManager
 
 - 
 - 
Method Details
- 
runStartupChecks
public boolean runStartupChecks()Finds largest UID for each PamDataBlock. Originally this method came up with a list of all UIDs from the database, another list of all UIDs from the binary files, and then tried to match up the PamDataBlocks with both lists. That has been commented out now and reworked to loop through the PamDataBlocks first, and only search for UIDs specific to each block. The original code was working, and therefore only commented out and not deleted in case we need to go back to it.- Specified by:
 runStartupChecksin interfaceUIDManager- Returns:
 - true if all checks completed successfully.
 
 - 
synchUIDs
public void synchUIDs(boolean onlyNewDataBlocks) Loop through the data blocks and try to find matching database and binary file UID information. Assign the highest UID value found to the data block. If the onlyNewDataBlocks flag is true, only perform this operation on data blocks which have a current UID of 0 (which will happen if the module has just been added).- Specified by:
 synchUIDsin interfaceUIDManager- Parameters:
 onlyNewDataBlocks-
 - 
runShutDownOps
public boolean runShutDownOps()Description copied from interface:UIDManagerCalled just before PAMGurd exits, at the same time that config data are written to the psf, etc. A time to write UID's to a file / the database and do any other cleaning up of the system prior to PC running again.- Specified by:
 runShutDownOpsin interfaceUIDManager- Returns:
 - true if all checks completed successfully.
 
 
 -