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
    Constructor | Description
    --- | ---
    `BaseConfigurationDeclarer()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `T` | `addConfiguration​(String config, Object value)` | Add in a single config.
    `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` | `setCPULoad​(Number amount)` | Set the amount of CPU load for this component.
    `T` | `setDebug​(boolean debug)` | Turn on/off debug for this component.
    `T` | `setMaxSpoutPending​(Number val)` | Set the max spout pending config for this component.
    `T` | `setMaxTaskParallelism​(Number val)` | Set the max task parallelism for this component.
    `T` | `setMemoryLoad​(Number onHeap)` | Set the amount of on heap memory for this component.
    `T` | `setMemoryLoad​(Number onHeap, Number offHeap)` | Set the amount of memory for this component on and off heap.
    `T` | `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, wait`

    - ### Methods inherited from interface org.apache.storm.topology.ComponentConfigurationDeclarer

      `addConfigurations, getComponentConfiguration`

    - ### Methods inherited from interface org.apache.storm.topology.ResourceDeclarer

      `addSharedMemory`

- - ### Constructor Detail

    - #### BaseConfigurationDeclarer

          public BaseConfigurationDeclarer()

  - ### Method Detail

    - #### addConfiguration

          public T addConfiguration​(String config,
                                    Object value)

      Description copied from interface: `ComponentConfigurationDeclarer`
      Add in a single config.
      Specified by:
        `addConfiguration` in interface `ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>`
      Parameters:
        `config` - the key for the config
        `value` - the value of the config
      Returns:
        this for chaining.

    - #### setDebug

          public T setDebug​(boolean debug)

      Description copied from interface: `ComponentConfigurationDeclarer`
      Turn on/off debug for this component.
      Specified by:
        `setDebug` in interface `ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>`
      Parameters:
        `debug` - true for debug on false for debug off
      Returns:
        this for chaining

    - #### setMaxTaskParallelism

          public T setMaxTaskParallelism​(Number val)

      Description copied from interface: `ComponentConfigurationDeclarer`
      Set the max task parallelism for this component.
      Specified by:
        `setMaxTaskParallelism` in interface `ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>`
      Parameters:
        `val` - the maximum parallelism
      Returns:
        this for chaining

    - #### setMaxSpoutPending

          public T setMaxSpoutPending​(Number val)

      Description copied from interface: `ComponentConfigurationDeclarer`
      Set the max spout pending config for this component.
      Specified by:
        `setMaxSpoutPending` in interface `ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>`
      Parameters:
        `val` - the value of max spout pending.
      Returns:
        this for chaining

    - #### setNumTasks

          public T setNumTasks​(Number val)

      Description copied from interface: `ComponentConfigurationDeclarer`
      Set the number of tasks for this component.
      Specified by:
        `setNumTasks` in interface `ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>`
      Parameters:
        `val` - the number of tasks
      Returns:
        this for chaining.

    - #### setMemoryLoad

          public T setMemoryLoad​(Number onHeap)

      Description copied from interface: `ResourceDeclarer`
      Set the amount of on heap memory for this component.
      Specified by:
        `setMemoryLoad` in interface `ResourceDeclarer<T extends ComponentConfigurationDeclarer>`
      Parameters:
        `onHeap` - the amount of on heap memory
      Returns:
        this for chaining

    - #### setMemoryLoad

          public T setMemoryLoad​(Number onHeap,
                                 Number offHeap)

      Description copied from interface: `ResourceDeclarer`
      Set the amount of memory for this component on and off heap.
      Specified by:
        `setMemoryLoad` in interface `ResourceDeclarer<T extends ComponentConfigurationDeclarer>`
      Parameters:
        `onHeap` - the amount of on heap memory
        `offHeap` - the amount of off heap memory
      Returns:
        this for chaining

    - #### setCPULoad

          public T setCPULoad​(Number amount)

      Description copied from interface: `ResourceDeclarer`
      Set the amount of CPU load for this component.
      Specified by:
        `setCPULoad` in interface `ResourceDeclarer<T extends ComponentConfigurationDeclarer>`
      Parameters:
        `amount` - the amount of CPU
      Returns:
        this for chaining

    - #### addResource

          public T addResource​(String resourceName,
                               Number resourceValue)

      Description copied from interface: `ComponentConfigurationDeclarer`
      Add generic resource for this component.
      Specified by:
        `addResource` in interface `ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>`

    - #### addResources

          public T addResources​(Map<String,​Double> resources)

      Add generic resources for this component.
      Specified by:
        `addResources` in interface `ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>`