public abstract class ReductionRule
extends java.lang.Object
The log passed in the constructor is compared with other logs
with applyRule(ILogEntry).
The log in the constructor is the base for the
reduction that depends on the criteria implemented in a
specific reduction rule.
If the rule is able to reduce logs (for example the message
contains an antenna name) then other logs are passed to it
through applyRule(ILogEntry): the rule keeps
track of the logs it reduces in order to generate a new log replacing
the log passed in the constructor and all the other logs.
Such a log is returned by getReducedLog().
| Modifier and Type | Field and Description |
|---|---|
protected ILogEntry |
initialLog
The log to be compared with other logs for reduction.
|
protected static java.lang.String |
placeHolder
The place holder for comparison
|
| Constructor and Description |
|---|
ReductionRule(ILogEntry initialLog)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
applyRule(ILogEntry logToReduce)
applyRule compares the log and the message and check if the log can be reduced.
|
abstract ILogEntry |
getReducedLog()
Return a comma separated list of the reduced items after running the
reduction rule over a set of logs.
|
abstract boolean |
isReducible() |
abstract boolean |
isReducingLogs() |
protected final ILogEntry initialLog
protected static final java.lang.String placeHolder
public ReductionRule(ILogEntry initialLog)
initialMessage - The message to be compared with other logs for reductionpublic abstract boolean isReducible()
public abstract boolean applyRule(ILogEntry logToReduce)
logToReduce - The log to reducetrue if the logs is reduced by this rule
false otherwisepublic abstract ILogEntry getReducedLog()
public abstract boolean isReducingLogs()
true if this rule is actually reducing logs