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 SummaryConstructors
- 
Method SummaryModifier 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.storm.topology.ComponentConfigurationDeclareraddConfigurations, getComponentConfigurationMethods inherited from interface org.apache.storm.topology.ResourceDeclareraddSharedMemory
- 
Constructor Details- 
BaseConfigurationDeclarerpublic BaseConfigurationDeclarer()
 
- 
- 
Method Details- 
addConfigurationDescription copied from interface:ComponentConfigurationDeclarerAdd in a single config.- Specified by:
- addConfigurationin interface- ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
- Parameters:
- config- the key for the config
- value- the value of the config
- Returns:
- this for chaining.
 
- 
setDebugDescription copied from interface:ComponentConfigurationDeclarerTurn on/off debug for this component.- Specified by:
- setDebugin interface- ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
- Parameters:
- debug- true for debug on false for debug off
- Returns:
- this for chaining
 
- 
setMaxTaskParallelismDescription copied from interface:ComponentConfigurationDeclarerSet the max task parallelism for this component.- Specified by:
- setMaxTaskParallelismin interface- ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
- Parameters:
- val- the maximum parallelism
- Returns:
- this for chaining
 
- 
setMaxSpoutPendingDescription copied from interface:ComponentConfigurationDeclarerSet the max spout pending config for this component.- Specified by:
- setMaxSpoutPendingin interface- ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
- Parameters:
- val- the value of max spout pending.
- Returns:
- this for chaining
 
- 
setNumTasksDescription copied from interface:ComponentConfigurationDeclarerSet the number of tasks for this component.- Specified by:
- setNumTasksin interface- ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
- Parameters:
- val- the number of tasks
- Returns:
- this for chaining.
 
- 
setMemoryLoadDescription copied from interface:ResourceDeclarerSet the amount of on heap memory for this component.- Specified by:
- setMemoryLoadin interface- ResourceDeclarer<T extends ComponentConfigurationDeclarer>
- Parameters:
- onHeap- the amount of on heap memory
- Returns:
- this for chaining
 
- 
setMemoryLoadDescription copied from interface:ResourceDeclarerSet the amount of memory for this component on and off heap.- Specified by:
- setMemoryLoadin interface- ResourceDeclarer<T extends ComponentConfigurationDeclarer>
- Parameters:
- onHeap- the amount of on heap memory
- offHeap- the amount of off heap memory
- Returns:
- this for chaining
 
- 
setCPULoadDescription copied from interface:ResourceDeclarerSet the amount of CPU load for this component.- Specified by:
- setCPULoadin interface- ResourceDeclarer<T extends ComponentConfigurationDeclarer>
- Parameters:
- amount- the amount of CPU
- Returns:
- this for chaining
 
- 
addResourceDescription copied from interface:ComponentConfigurationDeclarerAdd generic resource for this component.- Specified by:
- addResourcein interface- ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
 
- 
addResourcesAdd generic resources for this component.- Specified by:
- addResourcesin interface- ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
 
 
-