Interface LogEventNotifier
public interface LogEventNotifier
Interface for visibility/dependency purposes which logging systems call to when roll or delete events occur and which
 listeners for these events call to register.  The implementer maintains the collection of listeners and, on event
 occurrence, notifies all listeners.
- 
Method SummaryModifier and TypeMethodDescriptionvoiddeRegisterListener(LogEventListener eventListener) deRegister a listener for log events.getOldestLogRecordTime(String repositoryType) return the oldest record of the current type.voidrecordFileAction(String eventType, String repositoryType, Date curOldestDate) record that a file action has taken place on a file type, leaving current oldest record as curOldestDatevoidregisterListener(LogEventListener eventListener) register a new listener for log events.voidsetOldestDate(Date oldestDate, String repositoryType) set the oldest date based on repository type.
- 
Method Details- 
setOldestDateset the oldest date based on repository type. This is generally called soon after this object is constructed as the managers are notified of the object- Parameters:
- oldestDate- oldest date in the repository for that repository type. This may be null if manager is unable to determine oldest date
- repositoryType- type of repository (log/trace)
 
- 
recordFileActionrecord that a file action has taken place on a file type, leaving current oldest record as curOldestDate- Parameters:
- eventType- roll or delete
- repositoryType- log or trace
- curOldestDate- this will be null if it does not change the value or oldest date not determinable
 
- 
registerListenerregister a new listener for log events. This listener will be notified any time a roll or delete event occurs on a log or trace system.- Parameters:
- eventListener- implementer of the LogEventListener interface
 
- 
deRegisterListenerdeRegister a listener for log events. Indicates that this listener is no longer interested in receiving log and trace events- Parameters:
- eventListener- implementer of the LogEventListener interface
 
- 
getOldestLogRecordTimereturn the oldest record of the current type. For this sample, does not differentiate. In reality later, this will forward to the appropriate repositoryManager which will calculate oldest record.- Parameters:
- repositoryType- Log vs Trace
- Returns:
- Date of oldest record in the repository. Null if manager could not determine this.
 
 
-