|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.TimerTask | +--com.faa.flyfaa.DatabaseUpdater
Describes a DatabaseUpdater class, which will be kicked off when the FlyfaaProjectBean is instantiated. Its purpose is to read new Ground Delay Program, Ground Stop, Delay, and Closure information from the database if any new data exists in these OIS tables. This thread runs every 90 seconds. When this Thread starts, it first determines if there are any recently updated or recently deleted records in any of the OIS tables. If there is new data, it copies the data from the main ArrayLists, GDPA, GStopA, DelayA, and ClosureA, to similarly-named arrays with "old" at the beginning of their name. Then, the FlyLock is obtained to signal jsp users to read from the "old" arraylists. jsp users who get control while the FlyLock is not set will still read from the new arraylists.
Field Summary | |
private FlyfaaDbBean |
d
Provides access to the database |
private java.lang.String |
Logf
Pointer to the log file, which will be named FLYlogyyyy_Monddhhmm.txt (for example, FLYlog2003_Jan291940.txt) and is currently set up to reside in the /web/trace/atcscc/java_logs directory. |
private FlyFAAProjectBean |
p
Provides access to the FlyFAAProjectBean |
(package private) boolean |
stopRunning
Flag intended to signal the DatabaseUpdater to stop running. |
(package private) boolean |
UpdateInProgress
Flag to indicate whether a Database Update is in progress |
Fields inherited from class java.util.TimerTask |
CANCELLED, EXECUTED, lock, nextExecutionTime, period, SCHEDULED, state, VIRGIN |
Constructor Summary | |
DatabaseUpdater(FlyFAAProjectBean pb,
boolean calledbyBeanStalk)
Instantiation method for the DatabaseUpdater Thread. |
Method Summary | |
void |
checkFAAData()
Rereads the Delay/GDP/GSTOP/Closure info from the database. |
void |
clearUpdateInProgress()
Method to unset the UpdateInProgress flag. |
boolean |
isUpdateInProgress()
Method to return the value of the UpdateInProgress flag. |
void |
run()
Run method for the DatabaseUpdater Thread. |
void |
setUpdateInProgress()
Method to set the UpdateInProgress flag to true. |
Methods inherited from class java.util.TimerTask |
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.lang.String Logf
private FlyFAAProjectBean p
private FlyfaaDbBean d
boolean UpdateInProgress
boolean stopRunning
Constructor Detail |
public DatabaseUpdater(FlyFAAProjectBean pb, boolean calledbyBeanStalk)
pb
- FlyFAAProjectBean reference to the flyFAA 'Project' objectcalledbyBeanStalk
- true
if called by the FlyFAAProjectBeanStalk,
false
otherwise.Method Detail |
public boolean isUpdateInProgress()
UpdateInProgress
flag.
true
if reading of data is in progress, false
if
the reading of data from the database has finished.public void setUpdateInProgress()
UpdateInProgress
flag to true.public void clearUpdateInProgress()
UpdateInProgress
flag.public void run()
run
in class java.util.TimerTask
public void checkFAAData() throws java.sql.SQLException, java.io.IOException
FillDelayData
containing Tooltips for delayed airports.
java.sql.SQLException
- if a database access error occursjava.io.IOException
- if a database Connection cannot be obtained within 5 seconds
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |