Package org.apache.storm.scheduler

## Class SingleTopologyCluster

- java.lang.Object
- - org.apache.storm.scheduler.Cluster
  - - org.apache.storm.scheduler.SingleTopologyCluster

- All Implemented Interfaces:
    `ISchedulingState`

      public class SingleTopologyCluster
      extends Cluster

  A Cluster that only allows modification to a single topology.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SingleTopologyCluster​(Cluster other, String topologyId)` | Create a new cluster that only allows modifications to a single topology.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `assertValidTopologyForModification​(String topologyId)` | Check if the given topology is allowed for modification right now.

    - ### Methods inherited from class org.apache.storm.scheduler.Cluster

      `assign, assign, blacklistHost, freeSlot, freeSlots, getAllScheduledResourcesForNode, getAssignablePorts, getAssignableSlots, getAssignableSlots, getAssignedMemoryForSlot, getAssignedNumWorkers, getAssignmentById, getAssignments, getAvailablePorts, getAvailableResources, getAvailableSlots, getAvailableSlots, getBlacklistedHosts, getClusterTotalCpuResource, getClusterTotalGenericResources, getClusterTotalMemoryResource, getConf, getGreyListedSupervisors, getHost, getINimbus, getMinWorkerCpu, getNeedsSchedulingComponentToExecutors, getNeedsSchedulingExecutorToComponents, getNetworkTopography, getNonBlacklistedAvailableSlots, getNonBlacklistedClusterAvailableResources, getResourceMetrics, getScheduledCpuForNode, getScheduledMemoryForNode, getStatus, getStatusMap, getSupervisorById, getSupervisors, getSupervisorsByHost, getSupervisorsResourcesMap, getTopologies, getTopologyResourcesMap, getUnassignedExecutors, getUsedPorts, getUsedSlots, getUsedSlotsByTopologyId, getWorkerResources, getWorkerResourcesMap, isBlackListed, isBlacklistedHost, isSlotOccupied, needsScheduling, needsSchedulingRas, needsSchedulingTopologies, setAssignments, setBlacklistedHosts, setGreyListedSupervisors, setNetworkTopography, setStatus, setStatus, setStatusIfAbsent, setStatusMap, unassign, updateFrom, wouldFit`

    - ### 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.scheduler.ISchedulingState

      `getAssignedRacks, getHostToRack`

- - ### Constructor Detail

    - #### SingleTopologyCluster

          public SingleTopologyCluster​(Cluster other,
                                       String topologyId)

      Create a new cluster that only allows modifications to a single topology.
      Parameters:
        `other` - the current cluster to base this off of
        `topologyId` - the topology that is allowed to be modified.

  - ### Method Detail

    - #### assertValidTopologyForModification

          protected void assertValidTopologyForModification​(String topologyId)

      Description copied from class: `Cluster`
      Check if the given topology is allowed for modification right now. If not throw an IllegalArgumentException else go on.
      Overrides:
        `assertValidTopologyForModification` in class `Cluster`
      Parameters:
        `topologyId` - the id of the topology to check