Package com.sun.jini.mahalo.log
Class SimpleLogFile
java.lang.Object
com.sun.jini.mahalo.log.SimpleLogFile
An implementation of a re-usable
Log.- Author:
- Sun Microsystems, Inc.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleLogFile(String name, long cookie, MultiLogManager.LogRemovalManager logMgr) Creates aSimpleLogFile.SimpleLogFile(String name, MultiLogManager.LogRemovalManager logMgr) Creates a read-onlySimpleLogFileTo be used for read-only access to a namedLog. -
Method Summary
Modifier and TypeMethodDescriptionlongcookie()Returns the identifier associated with information in thisLog.voidInvalidate the log.voidrecover(LogRecovery client) Recover information from the log.voidAdd aLogRecordto theLog.
-
Constructor Details
-
SimpleLogFile
Creates a read-onlySimpleLogFileTo be used for read-only access to a namedLog. This is desired when recovering information from aLog.- Parameters:
name- names the file in which information is stored.logMgr-LogRemovalManagermanaging this log. This object is called back to remove this log from the manager's managed set of log files.- See Also:
-
SimpleLogFile
Creates aSimpleLogFile.- Parameters:
name- names the file in which information is stored.cookie- identifier representing information being stored.logMgr-LogRemovalManagermanaging this log. This object is called back to remove this log from the manager's responsibility.- See Also:
-
-
Method Details
-
cookie
public long cookie()Returns the identifier associated with information in thisLog. -
write
Add aLogRecordto theLog.- Specified by:
writein interfaceClientLog- Parameters:
rec- the record to be logged.- Throws:
LogException- See Also:
-
invalidate
Invalidate the log.- Specified by:
invalidatein interfaceClientLog- Throws:
LogException
-
recover
Recover information from the log.- Specified by:
recoverin interfaceLog- Parameters:
client- who to inform with information from the log.- Throws:
LogException- See Also:
-