ManualChangeTrackerpublic final class ManualChangeTracker extends Object This class provides a manager for tracking manual changes.
A thread runs every so often and collects info about a server
and updates its static variable.
Whenever there is a request from user, we check only the variable
to determine if there has been manual changes. |
Fields Summary |
---|
static Logger | loggerLogger for admin service | private static int | sleepPeriod | private static TrackerThread | trackerThread |
Methods Summary |
---|
static void | start()called from admin service during initialization
package specific
logger.log(Level.FINE, "core.tracker_thread_starting");
trackerThread = new TrackerThread();
trackerThread.start();
| static void | stop()called from AdminService during shutdown.
thread.destroy() is bad
thread.stop() is deprecated.
making trakerThread null is an elegant and preferred way of cleaning up the thread
Note that the while loop in the thread checks for null!
trackerThread = null;
logger.log(Level.FINE, "core.tracker_thread_stopping");
|
|