Package org.apache.storm.topology
Class BaseConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
java.lang.Object
org.apache.storm.topology.BaseConfigurationDeclarer<T>
- All Implemented Interfaces:
ComponentConfigurationDeclarer<T>,ResourceDeclarer<T>
- Direct Known Subclasses:
TopologyBuilder.ConfigGetter
public abstract class BaseConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
extends Object
implements ComponentConfigurationDeclarer<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddConfiguration(String config, Object value) Add in a single config.addResource(String resourceName, Number resourceValue) Add generic resource for this component.addResources(Map<String, Double> resources) Add generic resources for this component.setCPULoad(Number amount) Set the amount of CPU load for this component.setDebug(boolean debug) Turn on/off debug for this component.setMaxSpoutPending(Number val) Set the max spout pending config for this component.Set the max task parallelism for this component.setMemoryLoad(Number onHeap) Set the amount of on heap memory for this component.setMemoryLoad(Number onHeap, Number offHeap) Set the amount of memory for this component on and off heap.setNumTasks(Number val) Set the number of tasks for this component.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.storm.topology.ComponentConfigurationDeclarer
addConfigurations, getComponentConfigurationMethods inherited from interface org.apache.storm.topology.ResourceDeclarer
addSharedMemory
-
Constructor Details
-
BaseConfigurationDeclarer
public BaseConfigurationDeclarer()
-
-
Method Details
-
addConfiguration
Description copied from interface:ComponentConfigurationDeclarerAdd in a single config.- Specified by:
addConfigurationin interfaceComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>- Parameters:
config- the key for the configvalue- the value of the config- Returns:
- this for chaining.
-
setDebug
Description copied from interface:ComponentConfigurationDeclarerTurn on/off debug for this component.- Specified by:
setDebugin interfaceComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>- Parameters:
debug- true for debug on false for debug off- Returns:
- this for chaining
-
setMaxTaskParallelism
Description copied from interface:ComponentConfigurationDeclarerSet the max task parallelism for this component.- Specified by:
setMaxTaskParallelismin interfaceComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>- Parameters:
val- the maximum parallelism- Returns:
- this for chaining
-
setMaxSpoutPending
Description copied from interface:ComponentConfigurationDeclarerSet the max spout pending config for this component.- Specified by:
setMaxSpoutPendingin interfaceComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>- Parameters:
val- the value of max spout pending.- Returns:
- this for chaining
-
setNumTasks
Description copied from interface:ComponentConfigurationDeclarerSet the number of tasks for this component.- Specified by:
setNumTasksin interfaceComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>- Parameters:
val- the number of tasks- Returns:
- this for chaining.
-
setMemoryLoad
Description copied from interface:ResourceDeclarerSet the amount of on heap memory for this component.- Specified by:
setMemoryLoadin interfaceResourceDeclarer<T extends ComponentConfigurationDeclarer>- Parameters:
onHeap- the amount of on heap memory- Returns:
- this for chaining
-
setMemoryLoad
Description copied from interface:ResourceDeclarerSet the amount of memory for this component on and off heap.- Specified by:
setMemoryLoadin interfaceResourceDeclarer<T extends ComponentConfigurationDeclarer>- Parameters:
onHeap- the amount of on heap memoryoffHeap- the amount of off heap memory- Returns:
- this for chaining
-
setCPULoad
Description copied from interface:ResourceDeclarerSet the amount of CPU load for this component.- Specified by:
setCPULoadin interfaceResourceDeclarer<T extends ComponentConfigurationDeclarer>- Parameters:
amount- the amount of CPU- Returns:
- this for chaining
-
addResource
Description copied from interface:ComponentConfigurationDeclarerAdd generic resource for this component.- Specified by:
addResourcein interfaceComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
-
addResources
Add generic resources for this component.- Specified by:
addResourcesin interfaceComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
-