Class OutOfMemory
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.control.errorpostprocessor.AbstractErrorPostProcessor
-
- adams.flow.control.errorpostprocessor.OutOfMemory
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,ErrorPostProcessor,Serializable
public class OutOfMemory extends AbstractErrorPostProcessor
In case of an out of memory error, sends a log entry to the specified callable actor (if available).
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-log <adams.flow.core.CallableActorReference> (property: log) The name of the callable log actor to use (logging disabled if actor not found). default: unknown
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected CallableActorHelperm_Helperthe helper class.protected CallableActorReferencem_Logthe callable name.protected Actorm_LogActorthe callable log actor.protected booleanm_LogActorSetupwhether the callable log actor has been set up.static StringOUTOFMEMORY-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description OutOfMemory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheck(ErrorHandler handler, Actor source, String type, String msg)Hook method for checks.voiddefineOptions()Adds options to the internal list of options.protected StringdoPostProcessError(ErrorHandler handler, Actor source, String type, String msg)Performs the actual post-processing of the error.CallableActorReferencegetLog()Returns the name of the callable log actor in use.StringglobalInfo()Returns a string describing the object.protected voidinitialize()Initializes the members.StringlogTipText()Returns the tip text for this property.protected voidreset()Resets the scheme.voidsetLog(CallableActorReference value)Sets the name of the callable log actor to use.-
Methods inherited from class adams.flow.control.errorpostprocessor.AbstractErrorPostProcessor
postProcessError
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
OUTOFMEMORY
public static final String OUTOFMEMORY
- See Also:
- Constant Field Values
-
m_Log
protected CallableActorReference m_Log
the callable name.
-
m_LogActor
protected Actor m_LogActor
the callable log actor.
-
m_LogActorSetup
protected boolean m_LogActorSetup
whether the callable log actor has been set up.
-
m_Helper
protected CallableActorHelper m_Helper
the helper class.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classAbstractOptionHandler
-
reset
protected void reset()
Resets the scheme.- Overrides:
resetin classAbstractOptionHandler
-
setLog
public void setLog(CallableActorReference value)
Sets the name of the callable log actor to use.- Parameters:
value- the callable name
-
getLog
public CallableActorReference getLog()
Returns the name of the callable log actor in use.- Returns:
- the callable name
-
logTipText
public String logTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
check
protected void check(ErrorHandler handler, Actor source, String type, String msg)
Hook method for checks.- Overrides:
checkin classAbstractErrorPostProcessor- Parameters:
handler- the error handler that this call comes fromsource- the source actor where the error originatedtype- the type of errormsg- the error message
-
doPostProcessError
protected String doPostProcessError(ErrorHandler handler, Actor source, String type, String msg)
Performs the actual post-processing of the error.- Specified by:
doPostProcessErrorin classAbstractErrorPostProcessor- Parameters:
handler- the error handler that this call comes fromsource- the source actor where the error originatedtype- the type of errormsg- the error message- Returns:
- the (potentially) updated error message
-
-