Package org.apache.storm.topology
Class TopologyBuilder.ConfigGetter<T extends ComponentConfigurationDeclarer>
- java.lang.Object
-
- org.apache.storm.topology.BaseConfigurationDeclarer<T>
-
- org.apache.storm.topology.TopologyBuilder.ConfigGetter<T>
-
- All Implemented Interfaces:
ComponentConfigurationDeclarer<T>
,ResourceDeclarer<T>
- Direct Known Subclasses:
TopologyBuilder.BoltGetter
,TopologyBuilder.SpoutGetter
- Enclosing class:
- TopologyBuilder
protected class TopologyBuilder.ConfigGetter<T extends ComponentConfigurationDeclarer> extends BaseConfigurationDeclarer<T>
-
-
Constructor Summary
Constructors Constructor Description ConfigGetter(String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
addConfigurations(Map<String,Object> conf)
add in several configs to the component.T
addResource(String resourceName, Number resourceValue)
Add generic resource for this component.T
addResources(Map<String,Double> resources)
Add generic resources for this component.T
addSharedMemory(SharedMemory request)
Add in request for shared memory that this component will use.Map<String,Object>
getComponentConfiguration()
return the current component configuration.-
Methods inherited from class org.apache.storm.topology.BaseConfigurationDeclarer
addConfiguration, setCPULoad, setDebug, setMaxSpoutPending, setMaxTaskParallelism, setMemoryLoad, setMemoryLoad, setNumTasks
-
-
-
-
Constructor Detail
-
ConfigGetter
public ConfigGetter(String id)
-
-
Method Detail
-
addConfigurations
public T addConfigurations(Map<String,Object> conf)
Description copied from interface:ComponentConfigurationDeclarer
add in several configs to the component.- Parameters:
conf
- the configs to add- Returns:
- this for chaining.
-
getComponentConfiguration
public Map<String,Object> getComponentConfiguration()
return the current component configuration.- Returns:
- the current configuration.
-
addResources
public T addResources(Map<String,Double> resources)
Description copied from class:BaseConfigurationDeclarer
Add generic resources for this component.- Specified by:
addResources
in interfaceComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
- Overrides:
addResources
in classBaseConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
-
addResource
public T addResource(String resourceName, Number resourceValue)
Description copied from interface:ComponentConfigurationDeclarer
Add generic resource for this component.- Specified by:
addResource
in interfaceComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
- Overrides:
addResource
in classBaseConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
-
addSharedMemory
public T addSharedMemory(SharedMemory request)
Description copied from interface:ResourceDeclarer
Add in request for shared memory that this component will use. SeeSharedOnHeap
,SharedOffHeapWithinNode
, andSharedOffHeapWithinWorker
for convenient ways to create shared memory requests.- Parameters:
request
- the shared memory request for this component- Returns:
- this for chaining
-
-