|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is implemented by users of the Logger.
If a LogEventListener is registered, the logger will call the LogEventListener when interesting Log Events occur. For example, the Logger will notify the LogEventListener when the current log file is 50% full to allow the application to copy old log entries forward.
If the application does not register a LogEventListener it will not have visibility to Log events.
Method Summary | |
void |
logOverflowNotification(long logkey)
Called by Logger to notify the LogEventListener that a log file overflow is approaching. |
Method Detail |
public void logOverflowNotification(long logkey)
logkey
- lowest safe log key.
LogEventListener should cause log records with keys less than logkey to be copied forward to prevent a LogOverflowException.
Hopefully, the LogEventListener will be able to regenerate the records from memory without having to read the physical log file. For example, a Transaction Manager should maintain a table of transactions that are in the COMMITTING mode, with associated log key for each transaction. The logOverflowNotification method would call Logger.put() for each transaction that has a log key less than logKey .
Before returning from logOverflowNotification the LogEventListener should call Logger.mark(newMark, force) with force set to true to assure that the new records have been committed to physical disk.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |