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 TaddConfigurations(Map<String,Object> conf)add in several configs to the component.TaddResource(String resourceName, Number resourceValue)Add generic resource for this component.TaddResources(Map<String,Double> resources)Add generic resources for this component.TaddSharedMemory(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:ComponentConfigurationDeclareradd 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:BaseConfigurationDeclarerAdd generic resources for this component.- Specified by:
addResourcesin interfaceComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>- Overrides:
addResourcesin classBaseConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
-
addResource
public T addResource(String resourceName, Number resourceValue)
Description copied from interface:ComponentConfigurationDeclarerAdd generic resource for this component.- Specified by:
addResourcein interfaceComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>- Overrides:
addResourcein classBaseConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
-
addSharedMemory
public T addSharedMemory(SharedMemory request)
Description copied from interface:ResourceDeclarerAdd in request for shared memory that this component will use. SeeSharedOnHeap,SharedOffHeapWithinNode, andSharedOffHeapWithinWorkerfor convenient ways to create shared memory requests.- Parameters:
request- the shared memory request for this component- Returns:
- this for chaining
-
-