Public Member Functions | Protected Attributes | Static Protected Attributes

alma.acs.logging.table.reduction.ReductionRule Class Reference

Inheritance diagram for alma.acs.logging.table.reduction.ReductionRule:
alma.acs.logging.table.reduction.AntennaRule alma.acs.logging.table.reduction.SourceAntennaRule

List of all members.

Public Member Functions

 ReductionRule (ILogEntry initialLog)
abstract boolean isReducible ()
abstract boolean applyRule (final ILogEntry logToReduce)
abstract ILogEntry getReducedLog ()
abstract boolean isReducingLogs ()

Protected Attributes

final ILogEntry initialLog

Static Protected Attributes

static final String placeHolder = "\0\0\0\0"

Detailed Description

The objects that implement this interface are those that reduces the logs.

The log passed in the constructor is compared with other logs with ReductionRule#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 ReductionRule#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 ReductionRule#getReducedLog().

Author:
acaproni

Constructor & Destructor Documentation

alma.acs.logging.table.reduction.ReductionRule.ReductionRule ( ILogEntry  initialLog  ) 

Constructor

Parameters:
initialMessage The message to be compared with other logs for reduction

Member Function Documentation

abstract boolean alma.acs.logging.table.reduction.ReductionRule.applyRule ( final ILogEntry  logToReduce  )  [pure virtual]

applyRule compares the log and the message and check if the log can be reduced. If it is the case, the method returns a String representing the relevant part of the message to reduce

Parameters:
logToReduce The log to reduce
Returns:
true if the logs is reduced by this rule false otherwise

Implemented in alma.acs.logging.table.reduction.AntennaRule.

Referenced by alma.acs.logging.table.reduction.LogProcessor.reduce().

abstract ILogEntry alma.acs.logging.table.reduction.ReductionRule.getReducedLog (  )  [pure virtual]

Return a comma separated list of the reduced items after running the reduction rule over a set of logs.

Returns:
A formatted String with all the reduced items

Implemented in alma.acs.logging.table.reduction.AntennaRule, and alma.acs.logging.table.reduction.SourceAntennaRule.

Referenced by alma.acs.logging.table.reduction.LogProcessor.reduce().

abstract boolean alma.acs.logging.table.reduction.ReductionRule.isReducible (  )  [pure virtual]
abstract boolean alma.acs.logging.table.reduction.ReductionRule.isReducingLogs (  )  [pure virtual]

Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties