public abstract class Monitor extends java.lang.Object implements MonitorReport, MonitorAction
Modifier and Type | Field and Description |
---|---|
protected int |
actionCount |
protected EventActionGroup |
actionGroup |
protected org.apache.oro.text.regex.Pattern[][] |
aPatternGroup |
protected int |
cachedSkip |
protected java.lang.String |
category |
protected java.util.List[] |
dependencyGroup |
protected java.lang.String |
description |
protected boolean |
disabledWithReport |
protected int |
disableMode |
protected int |
exceptionCount |
protected int |
exceptionTolerance |
protected static java.lang.String |
FILE_SEPARATOR |
protected static java.lang.String[] |
formatText |
protected java.lang.String[] |
keyList |
protected int |
maxPage |
protected int |
maxRetry |
protected java.lang.String |
name |
protected int |
normalStep |
protected org.apache.oro.text.regex.Perl5Matcher |
pm |
protected int |
previousStatus |
protected int |
repeatPeriod |
protected java.util.Map<java.lang.String,java.lang.Object> |
report |
protected int |
reportMode |
protected java.lang.String |
reportName |
protected int |
resolution |
protected int |
serialNumber |
protected java.lang.String |
site |
protected int |
skip |
protected GenericLogger |
statsLogger |
protected int |
statusOffset |
protected static java.lang.String[] |
statusText |
protected int |
step |
protected Template |
template |
protected java.text.SimpleDateFormat[] |
timeFormat |
protected Template |
timeTemplate |
protected int |
tolerance |
protected java.lang.String |
type |
protected org.apache.oro.text.regex.Pattern[][] |
xPatternGroup |
DISABLED, EXCEPTION, NOSKIP, REPORT_CACHED, REPORT_CLUSTER, REPORT_FINAL, REPORT_FLOW, REPORT_LOCAL, REPORT_NODE, REPORT_NONE, REPORT_SHARED, SKIPPED
Constructor and Description |
---|
Monitor(java.util.Map props) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
checkpoint()
returns the checkpoint Map for the action
|
void |
destroy()
closes and releases all opened resources
|
protected void |
finalize() |
abstract java.util.Map<java.lang.String,java.lang.Object> |
generateReport(long currentTime)
generates a report on a monitored entity and returns it as a Map.
|
java.lang.String |
getName()
returns the name of the action
|
java.lang.String[] |
getReportKeys()
returns a copy of the shared report keys
|
int |
getReportMode()
returns the report mode
|
java.lang.String |
getReportName()
returns the name of the report
|
int |
getSkippingStatus()
returns the skipping status
|
protected int |
initTimeTemplate(java.lang.String text)
initializes the time-dependent template for dynamic support
|
abstract Event |
performAction(int status,
long currentTime,
java.util.Map<java.lang.String,java.lang.Object> latest)
examines the report on the monitored entity and reacts to it as an action
|
void |
restoreFromCheckpoint(java.util.Map<java.lang.String,java.lang.Object> chkpt)
restores the state of the action from the checkpoint Map
|
protected java.lang.String |
updateContent(long currentTime)
returns the updated time-dependent content or null if it is static
|
protected java.lang.String name
protected java.lang.String site
protected java.lang.String category
protected java.lang.String type
protected java.lang.String description
protected Template template
protected java.util.Map<java.lang.String,java.lang.Object> report
protected EventActionGroup actionGroup
protected java.util.List[] dependencyGroup
protected int maxRetry
protected int maxPage
protected int tolerance
protected int exceptionTolerance
protected int repeatPeriod
protected int step
protected int normalStep
protected int serialNumber
protected int previousStatus
protected int skip
protected int actionCount
protected int exceptionCount
protected int disableMode
protected int reportMode
protected int statusOffset
protected int cachedSkip
protected int resolution
protected boolean disabledWithReport
protected GenericLogger statsLogger
protected org.apache.oro.text.regex.Pattern[][] aPatternGroup
protected org.apache.oro.text.regex.Pattern[][] xPatternGroup
protected org.apache.oro.text.regex.Perl5Matcher pm
protected java.lang.String reportName
protected java.lang.String[] keyList
protected java.text.SimpleDateFormat[] timeFormat
protected Template timeTemplate
protected static final java.lang.String[] statusText
protected static final java.lang.String[] formatText
protected static final java.lang.String FILE_SEPARATOR
public abstract java.util.Map<java.lang.String,java.lang.Object> generateReport(long currentTime) throws java.lang.Exception
MonitorReport
generateReport
in interface MonitorReport
java.lang.Exception
public abstract Event performAction(int status, long currentTime, java.util.Map<java.lang.String,java.lang.Object> latest)
MonitorAction
performAction
in interface MonitorAction
public java.lang.String getName()
MonitorAction
getName
in interface MonitorAction
public int getSkippingStatus()
MonitorReport
getSkippingStatus
in interface MonitorReport
public int getReportMode()
MonitorReport
getReportMode
in interface MonitorReport
public java.lang.String getReportName()
MonitorReport
getReportName
in interface MonitorReport
public java.lang.String[] getReportKeys()
MonitorReport
getReportKeys
in interface MonitorReport
public java.util.Map<java.lang.String,java.lang.Object> checkpoint()
MonitorAction
checkpoint
in interface MonitorAction
public void restoreFromCheckpoint(java.util.Map<java.lang.String,java.lang.Object> chkpt)
MonitorAction
restoreFromCheckpoint
in interface MonitorAction
protected int initTimeTemplate(java.lang.String text)
protected java.lang.String updateContent(long currentTime)
public void destroy()
MonitorReport
destroy
in interface MonitorReport
protected void finalize()
finalize
in class java.lang.Object