Package org.apache.storm

## Class LocalCluster.LocalTopology

- java.lang.Object
- - org.apache.storm.generated.StormTopology
  - - org.apache.storm.LocalCluster.LocalTopology

- All Implemented Interfaces:
    `Serializable`, `AutoCloseable`, `Cloneable`, `Comparable<StormTopology>`, `ILocalCluster.ILocalTopology`, `org.apache.storm.thrift.TBase<StormTopology,​StormTopology._Fields>`, `org.apache.storm.thrift.TSerializable`
  Enclosing class:
    LocalCluster

      public class LocalCluster.LocalTopology
      extends StormTopology
      implements ILocalCluster.ILocalTopology

  When running a topology locally, for tests etc. It is helpful to be sure that the topology is dead before the test exits. This is an AutoCloseable topology that not only gives you access to the compiled StormTopology but also will kill the topology when it closes. `try (LocalTopology testTopo = cluster.submitTopology("testing", ...)) { // Run Some test } // The topology has been killed`
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.storm.generated.StormTopology

      `StormTopology._Fields`

  - ### Field Summary

    - ### Fields inherited from class org.apache.storm.generated.StormTopology

      `metaDataMap`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `LocalTopology​(String topoName, StormTopology topo)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `close()` |

    - ### Methods inherited from class org.apache.storm.generated.StormTopology

      `add_to_dependency_artifacts, add_to_dependency_jars, add_to_worker_hooks, clear, compareTo, deepCopy, equals, equals, fieldForId, get_bolts, get_bolts_size, get_component_to_shared_memory, get_component_to_shared_memory_size, get_dependency_artifacts, get_dependency_artifacts_iterator, get_dependency_artifacts_size, get_dependency_jars, get_dependency_jars_iterator, get_dependency_jars_size, get_jdk_version, get_shared_memory, get_shared_memory_size, get_spouts, get_spouts_size, get_state_spouts, get_state_spouts_size, get_storm_version, get_worker_hooks, get_worker_hooks_iterator, get_worker_hooks_size, getFieldValue, hashCode, is_set_bolts, is_set_component_to_shared_memory, is_set_dependency_artifacts, is_set_dependency_jars, is_set_jdk_version, is_set_shared_memory, is_set_spouts, is_set_state_spouts, is_set_storm_version, is_set_worker_hooks, isSet, put_to_bolts, put_to_component_to_shared_memory, put_to_shared_memory, put_to_spouts, put_to_state_spouts, read, set_bolts, set_bolts_isSet, set_component_to_shared_memory, set_component_to_shared_memory_isSet, set_dependency_artifacts, set_dependency_artifacts_isSet, set_dependency_jars, set_dependency_jars_isSet, set_jdk_version, set_jdk_version_isSet, set_shared_memory, set_shared_memory_isSet, set_spouts, set_spouts_isSet, set_state_spouts, set_state_spouts_isSet, set_storm_version, set_storm_version_isSet, set_worker_hooks, set_worker_hooks_isSet, setFieldValue, toString, unset_bolts, unset_component_to_shared_memory, unset_dependency_artifacts, unset_dependency_jars, unset_jdk_version, unset_shared_memory, unset_spouts, unset_state_spouts, unset_storm_version, unset_worker_hooks, validate, write`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### LocalTopology

          public LocalTopology​(String topoName,
                               StormTopology topo)

  - ### Method Detail

    - #### close

          public void close()
                     throws org.apache.storm.thrift.TException

      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `org.apache.storm.thrift.TException`