public class LazyArchiverCache extends AbstractArchiverCache
Constructor and Description |
---|
LazyArchiverCache(ArchiveNameResolver resolver)
Construct a LogArchiver archiving message from the given root object
and all it's children.
|
LazyArchiverCache(int maxHistory,
ArchiveNameResolver resolver)
Construct a LogArchiver archiving message from the given root object
and all it's children with the given amount of history.
|
Modifier and Type | Method and Description |
---|---|
void |
addLogListener(LogListener l,
java.lang.Object component,
LogLevel level,
long last,
int history)
Add a listener.
|
void |
destroy() |
void |
removeLogListener(LogListener l,
java.lang.Object component)
Remove a listener.
|
addArchive, addEvent, getLastMessageNumber, getMaxHistory, getResolver, hasArchive, hasArchiveFor, removeArchive
public LazyArchiverCache(ArchiveNameResolver resolver)
root
- The root object.resolver
- A reslover which resolves archive name, either locally
or using a remote url.public LazyArchiverCache(int maxHistory, ArchiveNameResolver resolver)
root
- The root object.maxHistory
- The number of lines to store for each loggerresolver
- A reslover which resolves archive name, either locally
or using a remote url.public void addLogListener(LogListener l, java.lang.Object component, LogLevel level, long last, int history)
AbstractArchiverCache
addLogListener
in interface LogArchiverCache
addLogListener
in class AbstractArchiverCache
l
- The listenerlevel
- The levellast
- The last message number.history
- The max messages required.public void removeLogListener(LogListener l, java.lang.Object component)
AbstractArchiverCache
removeLogListener
in interface LogArchiverCache
removeLogListener
in class AbstractArchiverCache
l
- The listener.public void destroy()
destroy
in interface LogArchiverCache
destroy
in class AbstractArchiverCache