Package adams.flow.processor
Class ChangeNumThreads
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<ActorProcessor>
,SizeOfHandler
,ActorProcessor
,ModifyingProcessor
,Serializable
,Comparable<ActorProcessor>
public class ChangeNumThreads extends AbstractModifyingProcessor
Processor that changes the number of threads used for classes that implementThreadLimiter
.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_ChangeAll
whether to change all settings.protected int
m_NewNumThreads
the setting.protected int
m_OldNumThreads
the old setting.protected BaseRegExp
m_RegExp
the classnames to limit the change to.-
Fields inherited from class adams.flow.processor.AbstractModifyingProcessor
m_Modified, m_ModifiedActor, m_NoCopy
-
Fields inherited from class adams.flow.processor.AbstractActorProcessor
m_Errors
-
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 ChangeNumThreads()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
changeAllTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.boolean
getChangeAll()
Returns whether to change all settings, not just the ones that match the specified old setting.int
getNewNumThreads()
Returns the new setting to use.int
getOldNumThreads()
Returns the old setting to replace.BaseRegExp
getRegExp()
Returns the regular expression to apply to the classname of the object for limiting the scope of the replacement.String
globalInfo()
Returns a string describing the object.String
newNumThreadsTipText()
Returns the tip text for this property.String
oldNumThreadsTipText()
Returns the tip text for this property.protected void
processActor(Actor actor)
Performs the actual processing.String
regExpTipText()
Returns the tip text for this property.void
setChangeAll(boolean value)
Sets whether to change all settings, not just the ones that match the specified old setting.void
setNewNumThreads(int value)
Sets the new setting to use.void
setOldNumThreads(int value)
Sets the old setting to replace.void
setRegExp(BaseRegExp value)
Sets the regular expression to apply to the classname of the object for limiting the scope of the replacement.-
Methods inherited from class adams.flow.processor.AbstractModifyingProcessor
getModifiedActor, getNoCopy, initialize, isModified, process, setNoCopy
-
Methods inherited from class adams.flow.processor.AbstractActorProcessor
addError, addError, checkData, compareTo, equals, getErrors, hasErrors, reset, shallowCopy, shallowCopy
-
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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.flow.processor.ActorProcessor
compareTo, getErrors, hasErrors, shallowCopy, shallowCopy
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_OldNumThreads
protected int m_OldNumThreads
the old setting.
-
m_ChangeAll
protected boolean m_ChangeAll
whether to change all settings.
-
m_RegExp
protected BaseRegExp m_RegExp
the classnames to limit the change to.
-
m_NewNumThreads
protected int m_NewNumThreads
the setting.
-
-
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
-
setOldNumThreads
public void setOldNumThreads(int value)
Sets the old setting to replace.- Parameters:
value
- the old setting
-
getOldNumThreads
public int getOldNumThreads()
Returns the old setting to replace.- Returns:
- the old setting
-
oldNumThreadsTipText
public String oldNumThreadsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setChangeAll
public void setChangeAll(boolean value)
Sets whether to change all settings, not just the ones that match the specified old setting.- Parameters:
value
- true if change all
-
getChangeAll
public boolean getChangeAll()
Returns whether to change all settings, not just the ones that match the specified old setting.- Returns:
- true if to change all
-
changeAllTipText
public String changeAllTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setRegExp
public void setRegExp(BaseRegExp value)
Sets the regular expression to apply to the classname of the object for limiting the scope of the replacement.- Parameters:
value
- the expression
-
getRegExp
public BaseRegExp getRegExp()
Returns the regular expression to apply to the classname of the object for limiting the scope of the replacement.- Returns:
- the expression
-
regExpTipText
public String regExpTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setNewNumThreads
public void setNewNumThreads(int value)
Sets the new setting to use.- Parameters:
value
- the new setting
-
getNewNumThreads
public int getNewNumThreads()
Returns the new setting to use.- Returns:
- the new setting
-
newNumThreadsTipText
public String newNumThreadsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
processActor
protected void processActor(Actor actor)
Performs the actual processing.- Specified by:
processActor
in classAbstractActorProcessor
- Parameters:
actor
- the actor to process (is a copy of original for processors implementing ModifyingProcessor)- See Also:
ModifyingProcessor
-
-