org.oddjob.logging.cache
Class StructuralArchiverCache

java.lang.Object
  extended by org.oddjob.logging.cache.AbstractArchiverCache
      extended by org.oddjob.logging.cache.StructuralArchiverCache
All Implemented Interfaces:
LogArchiverCache

public class StructuralArchiverCache
extends AbstractArchiverCache

A Cache for Log Events. This cache tracks changes to the structure of the component tree and adds and removes LogArchives.

Author:
Rob Gordon.

Constructor Summary
StructuralArchiverCache(Object root, ArchiveNameResolver resolver)
          Construct a LogArchiver archiving message from the given root object and all it's children.
StructuralArchiverCache(Object root, 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.
 
Method Summary
 void destroy()
           
 
Methods inherited from class org.oddjob.logging.cache.AbstractArchiverCache
addArchive, addEvent, addLogListener, getLastMessageNumber, getMaxHistory, getResolver, hasArchive, hasArchiveFor, removeArchive, removeLogListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StructuralArchiverCache

public StructuralArchiverCache(Object root,
                               ArchiveNameResolver resolver)
Construct a LogArchiver archiving message from the given root object and all it's children.

Parameters:
root - The root object.
resolver - A reslover which resolves archive name, either locally or using a remote url.

StructuralArchiverCache

public StructuralArchiverCache(Object root,
                               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.

Parameters:
root - The root object.
maxHistory - The number of lines to store for each logger
resolver - A reslover which resolves archive name, either locally or using a remote url.
Method Detail

destroy

public void destroy()
Specified by:
destroy in interface LogArchiverCache
Specified by:
destroy in class AbstractArchiverCache