GigaSpaces XAP 9.7.2 API

com.gigaspaces.log
Class LogEntryMatcherFilter

java.lang.Object
  extended by com.gigaspaces.log.LogEntryMatcherFilter
All Implemented Interfaces:
LogEntryMatcher, Serializable
Direct Known Subclasses:
AfterEntryLogEntryMatcher, AfterTimeLogEntryMatcher, BeforeEntryLogEntryMatcher, BeforeTimeLogEntryMatcher, ContainsStringLogEntryMatcher, FirstFileLogEntryMatcher, LastNLogEntryMatcher, NoneLogEntryMatcher, RegexLogEntryMatcher, SameFileLogEntryMatcher

public abstract class LogEntryMatcherFilter
extends Object
implements LogEntryMatcher

A base class for entry matchers that act as filters to a delegated matcher.

Author:
kimchy
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.gigaspaces.log.LogEntryMatcher
LogEntryMatcher.InitializationContext, LogEntryMatcher.Operation
 
Constructor Summary
protected LogEntryMatcherFilter(LogEntryMatcher matcher)
           
 
Method Summary
 List<LogEntry> entries()
          Returns all the relevant entries this matcher accumulated.
protected abstract  LogEntryMatcher.Operation filter(LogEntry entry)
          Should the operation be filtered or not.
protected  boolean filterJustLogs()
          Should this filter only filter log type entries.
 void initialize(LogEntryMatcher.InitializationContext context)
          Called on the loggable component side (server) before starting to traverse the log file.
 LogEntryMatcher.Operation match(LogEntry entry)
          Controls if the traversal of the log file should continue, or break.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogEntryMatcherFilter

protected LogEntryMatcherFilter(LogEntryMatcher matcher)
Method Detail

initialize

public void initialize(LogEntryMatcher.InitializationContext context)
                throws IOException
Description copied from interface: LogEntryMatcher
Called on the loggable component side (server) before starting to traverse the log file.

Specified by:
initialize in interface LogEntryMatcher
Throws:
IOException

entries

public List<LogEntry> entries()
Description copied from interface: LogEntryMatcher
Returns all the relevant entries this matcher accumulated.

Note, for ease of use in implementing the matcher, the entries are assumed to be from newest to oldest (if the matcher value order).

Specified by:
entries in interface LogEntryMatcher

match

public LogEntryMatcher.Operation match(LogEntry entry)
Description copied from interface: LogEntryMatcher
Controls if the traversal of the log file should continue, or break. If it should break, then all the LogEntryMatcher.entries() accumulated will be returned.

Specified by:
match in interface LogEntryMatcher

filterJustLogs

protected boolean filterJustLogs()
Should this filter only filter log type entries. Defaults to true.


filter

protected abstract LogEntryMatcher.Operation filter(LogEntry entry)
Should the operation be filtered or not. LogEntryMatcher.Operation.BREAK in order to break and finish the matching process. LogEntryMatcher.Operation.IGNORE to ignore the current log entry (so it won't be passed to the delegated matcher). And LogEntryMatcher.Operation.CONTINUE to pass the current log entry to the delegated matcher.


GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.