Package org.objectweb.howl.log
Class LogState
- java.lang.Object
-
- org.objectweb.howl.log.LogState
-
class LogState extends java.lang.ObjectManage 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.
-
-
Constructor Summary
Constructors Constructor Description LogState()Construct LogState instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidload()loads state variables from property file.(package private) voidlock()make state unavailable whil log is open.(package private) voidsave()saves state variables to property file.
-
-
-
Method Detail
-
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.
-
-