Package org.apache.storm.scheduler
Class Topologies
java.lang.Object
org.apache.storm.scheduler.Topologies
- All Implemented Interfaces:
Iterable<TopologyDetails>
-
Constructor Summary
ConstructorsConstructorDescriptionTopologies(Map<String, TopologyDetails> topologies) Create a new Topologies from a map of id to topology.Topologies(Topologies src) Copy constructor.Topologies(TopologyDetails... details) Create a new Topologies from a list of TopologyDetails. -
Method Summary
Modifier and TypeMethodDescriptionGet a topology given an ID.Get a topology given a topology name.getTopologiesOwnedBy(String user) Get all topologies submitted/owned by a given user.iterator()toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Topologies
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
Create a new Topologies from a map of id to topology.- Parameters:
topologies- a map of topology id to topology details
-
Topologies
Copy constructor.
-
-
Method Details
-
getAllIds
-
getById
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
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
-
getTopologiesOwnedBy
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
-
iterator
- Specified by:
iteratorin interfaceIterable<TopologyDetails>
-