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 CallableActorHelper
m_Helper
the helper class.protected CallableActorReference
m_Log
the callable name.protected Actor
m_LogActor
the callable log actor.protected boolean
m_LogActorSetup
whether the callable log actor has been set up.static String
OUTOFMEMORY
-
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 void
check(ErrorHandler handler, Actor source, String type, String msg)
Hook method for checks.void
defineOptions()
Adds options to the internal list of options.protected void
doPostProcessError(ErrorHandler handler, Actor source, String type, String msg)
Performs the actual post-processing of the error.CallableActorReference
getLog()
Returns the name of the callable log actor in use.String
globalInfo()
Returns a string describing the object.protected void
initialize()
Initializes the members.String
logTipText()
Returns the tip text for this property.protected void
reset()
Resets the scheme.void
setLog(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:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classAbstractOptionHandler
-
reset
protected void reset()
Resets the scheme.- Overrides:
reset
in 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:
check
in 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 void doPostProcessError(ErrorHandler handler, Actor source, String type, String msg)
Performs the actual post-processing of the error.- Specified by:
doPostProcessError
in 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
-
-