public class ResetFinalizer extends XMLErrorFinalizer
XMLErrorFinalizer for errors that
are allowed to occur at a certain frequency, but are then replaced by an
alternate sequence. Additionally to the parent class, this finalizer has
an KEY_ALTERNATEFILE sequence specified, which is an alternate
sequence to load, pointing to a file in the same way as the
XMLErrorFinalizer.KEY_XMLFILE does. Each time an error with the appropriate follow-up
is encountered, it's occurence time is stored in a list. If the
number of appropriate errors received within KEY_INTERVAL
exceeds KEY_MAXNUMBER, then the alternate sequence is loaded.
Note that further occurences of the error might nevertheless spark
the original sequence to be executed, if the error frequency cools down
accordingly.XMLErrorFinalizer.ErrorDistributorPropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFALTERNATEFILE
A file holding the shutdown sequence.
|
private static String |
DEFALTERNATETYPE
A file holding the shutdown sequence.
|
private static long |
DEFINTERVAL
The default time intervall, in ms.
|
private static int |
DEFMAXNUMBER
The default maximum number of occurences within the time interval.
|
static String |
KEY_ALTERNATEFILE
The xml-file to load if error-frequency is too high.
|
static String |
KEY_ALTERNATETYPE
The type of the alternate sequence.
|
static String |
KEY_INTERVAL
The base time intervall.
|
static String |
KEY_MAXNUMBER
The maximum number of errors occured within the base time interval.
|
private List |
times
A list of error-occurence times.
|
ABORT, APPEND, KEY_FOLLOWUP, KEY_TYPE, KEY_XMLFILE, PREPENDKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASSKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME| Constructor and Description |
|---|
ResetFinalizer(Map prop)
Constructs a new reset finalizer.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
finalizeError(TargetDefinition src,
ErrorEvent ee,
CommandLaunching[] dummy,
Sequencing<?> seq,
ParameterClustering set)
The incomming errors.
|
getFollowUp, isAborting, isFinalizing, startRecoverycreateErrorFinalizer, init, setMonitor, wakeclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, parseObject, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetMonitordefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiespublic static final String KEY_ALTERNATEFILE
public static final String KEY_ALTERNATETYPE
public static final String KEY_INTERVAL
public static final String KEY_MAXNUMBER
private static final String DEFALTERNATEFILE
private static final String DEFALTERNATETYPE
private static final long DEFINTERVAL
private static final int DEFMAXNUMBER
private final List times
public ResetFinalizer(Map prop)
public boolean finalizeError(TargetDefinition src, ErrorEvent ee, CommandLaunching[] dummy, Sequencing<?> seq, ParameterClustering set)
times list. From this occurence time, all outdated entries
from the times list are deleted. If the size of the list is then still
larger then KEY_MAXNUMBER, the alternate sequence
KEY_ALTERNATEFILE is loaded and executed using its
KEY_ALTERNATETYPE style.finalizeError in interface ErrorFinalizingfinalizeError in class XMLErrorFinalizer