Class Topologies

java.lang.Object
org.apache.storm.scheduler.Topologies
All Implemented Interfaces:
Iterable<TopologyDetails>

public class Topologies extends Object implements Iterable<TopologyDetails>
  • Constructor Details

    • Topologies

      public Topologies(TopologyDetails... details)
      Create a new Topologies from a list of TopologyDetails.
      Parameters:
      details - the list of details to use.
      Throws:
      IllegalArgumentException - if duplicate topology ids are found.
    • Topologies

      public Topologies(Map<String,TopologyDetails> topologies)
      Create a new Topologies from a map of id to topology.
      Parameters:
      topologies - a map of topology id to topology details
    • Topologies

      public Topologies(Topologies src)
      Copy constructor.
  • Method Details

    • getAllIds

      public Collection<String> getAllIds()
    • getById

      public TopologyDetails getById(String topologyId)
      Get a topology given an ID.
      Parameters:
      topologyId - the id of the topology to get
      Returns:
      the topology or null if it is not found
    • getByName

      public TopologyDetails getByName(String topologyName)
      Get a topology given a topology name. Nimbus prevents multiple topologies from having the same name, so this assumes it is true.
      Parameters:
      topologyName - the name of the topology to look for
      Returns:
      the a topology with the given name.
    • getTopologies

      public Collection<TopologyDetails> getTopologies()
    • getTopologiesOwnedBy

      public Collection<TopologyDetails> getTopologiesOwnedBy(String user)
      Get all topologies submitted/owned by a given user.
      Parameters:
      user - the name of the user
      Returns:
      all of the topologies submitted by this user.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • iterator

      public Iterator<TopologyDetails> iterator()
      Specified by:
      iterator in interface Iterable<TopologyDetails>