org.apache.storm.topology

## Interface ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>

- All Superinterfaces:
    ResourceDeclarer<T>
  All Known Subinterfaces:
    BoltDeclarer, LinearDRPCInputDeclarer, SpoutDeclarer
  All Known Implementing Classes:
    BaseConfigurationDeclarer, TopologyBuilder.BoltGetter, TopologyBuilder.ConfigGetter, TopologyBuilder.SpoutGetter

      public interface ComponentConfigurationDeclarer<T extends ComponentConfigurationDeclarer>
      extends ResourceDeclarer<T>

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `addConfiguration(String config, Object value)` Add in a single config.
    `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.
    `Map<String,Object>` | `getComponentConfiguration()` return the current component configuration.
    `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` | `setNumTasks(Number val)` Set the number of tasks for this component.

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

      `addSharedMemory, setCPULoad, setMemoryLoad, setMemoryLoad`

- - ### Method Detail

    - #### addConfigurations

          T addConfigurations(Map<String,Object> conf)

      add in several configs to the component.

      Parameters:
        `conf` - the configs to add
      Returns:
        this for chaining.

    - #### getComponentConfiguration

          Map<String,Object> getComponentConfiguration()

      return the current component configuration.

      Returns:
        the current configuration.

    - #### addConfiguration

          T addConfiguration(String config,
                             Object value)

      Add in a single config.

      Parameters:
        `config` - the key for the config
        `value` - the value of the config
      Returns:
        this for chaining.

    - #### setDebug

          T setDebug(boolean debug)

      Turn on/off debug for this component.

      Parameters:
        `debug` - true for debug on false for debug off
      Returns:
        this for chaining

    - #### setMaxTaskParallelism

          T setMaxTaskParallelism(Number val)

      Set the max task parallelism for this component.

      Parameters:
        `val` - the maximum parallelism
      Returns:
        this for chaining

    - #### setMaxSpoutPending

          T setMaxSpoutPending(Number val)

      Set the max spout pending config for this component.

      Parameters:
        `val` - the value of max spout pending.
      Returns:
        this for chaining

    - #### setNumTasks

          T setNumTasks(Number val)

      Set the number of tasks for this component.

      Parameters:
        `val` - the number of tasks
      Returns:
        this for chaining.

    - #### addResources

          T addResources(Map<String,Double> resources)

      Add generic resources for this component.

    - #### addResource

          T addResource(String resourceName,
                        Number resourceValue)

      Add generic resource for this component.

Copyright © 2021 The Apache Software Foundation. All rights reserved.