Package org.objectweb.howl.log
Class LogState
java.lang.Object
org.objectweb.howl.log.LogState
Manage state variables for the Logger instance.
state variables are saved when logger is closed.
when a logger is open, a lock file is created to record the fact that a logger is active. Whe the logger is closed, the lock file is deleted. If the system or JVM crashes before the logger is closed, the lock file will serve to notify future users of the log that recovery may be necessary.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
state
Properties state -
lockFile
File lockFile -
stateFile
File stateFile
-
-
Constructor Details
-
LogState
LogState()Construct LogState instance.
-
-
Method Details
-
load
void load()loads state variables from property file. -
save
void save()saves state variables to property file. -
lock
void lock()make state unavailable whil log is open.Locking the state is accomplished by creating a ".lock" file. Presence of the lock file indicates that an instance of the logger is currently open, or that a previous instance failed to close properly, perhaps due to system or JVM failure.
-