Connect this streamlet to TopologyBuilder.
@param bldr The TopologyBuilder for the topology
@param stageNames The existing stage names
@return True if successful
12291
@Override
  public boolean doBuild(TopologyBuilder bldr, Set<String> stageNames) {
    setDefaultNameIfNone(StreamletNamePrefix.LOGGER, stageNames);
    bldr.setBolt(getName(), new LogSink<R>(),
        getNumPartitions()).shuffleGrouping(parent.getName(), parent.getStreamId());
    return true;
  }
301803
public void setBlueprints(java.util.Collection<Blueprint> blueprints) {
        if (blueprints == null) {
            this.blueprints = null;
            return;
        }

        this.blueprints = new java.util.ArrayList<Blueprint>(blueprints);
    }
808667
private function assertThereIsAtLeastOneConnectorPerIntermediaryStage(
        $stageNumber,
        $stageCount,
        $stageName,
        $stageConnectors
    ) {
        if ($stageNumber < $stageCount && count($stageConnectors) == 0) {
            throw new PipelineBuildingException("No stage connector found for stage '$stageName'.");
        }
    }
892725
def isConnected(self, fromName, toName):
        
        for c in self.connections:
            if (c.fromLayer.name == fromName and
                c.toLayer.name == toName):
                return 1
        return 0
1237776
@Override
  public ServerHeartbeat serverDyn(String address,
                                   int port,
                                   boolean isSSL,
                                   String clusterId,
                                   String displayName)
  {
    Objects.requireNonNull(address);
    Objects.requireNonNull(clusterId);

    /*
    if (port <= 0) {
      throw new IllegalArgumentException();
    }
    */
    
    ClusterHeartbeat cluster = createCluster(clusterId);
    
    ServerHeartbeat server = cluster.createServer(address, port, isSSL);
    
    if (displayName != null) {
      server.setDisplayName(displayName);
    }
    
    cluster.addDynamicServer(server);
    
    return server;
  }
876967
protected boolean doTopologyAssignment(TopologyAssignEvent event) {
        Assignment assignment;
        try {
            Assignment oldAssignment = null;
            boolean isReassign = event.isScratch();
            if (isReassign) {
                oldAssignment = nimbusData.getStormClusterState().assignment_info(event.getTopologyId(), null);
            }
            assignment = mkAssignment(event);

            pushTaskStartEvent(oldAssignment, assignment, event);

            if (!isReassign) {
                setTopologyStatus(event);
            }
        } catch (Throwable e) {
            LOG.error("Failed to assign topology " + event.getTopologyId(), e);
            event.fail(e.getMessage());
            return false;
        }

        if (assignment != null)
            backupAssignment(assignment, event);
        event.done();
        return true;
    }
99953
public void setFieldNames(java.util.Collection<String> fieldNames) {
        if (fieldNames == null) {
            this.fieldNames = null;
            return;
        }

        this.fieldNames = new com.amazonaws.internal.SdkInternalList<String>(fieldNames);
    }
1058350
public Boolean updatePackingPlan(PackingPlans.PackingPlan packingPlan, String topologyName) {
    if (getPackingPlan(topologyName) != null) {
      deletePackingPlan(topologyName);
    }
    return setPackingPlan(packingPlan, topologyName);
  }
56847
def stage_hub(hub, staging=None):
    
    linknames = []
    if staging is None:
        staging = tempfile.mkdtemp()
    for obj, level in hub.leaves(base.HubComponent, intermediate=True):
        linknames.extend(stage(obj, staging))

    return staging, linknames
127327
public void setConnectIps(java.util.Collection<String> connectIps) {
        if (connectIps == null) {
            this.connectIps = null;
            return;
        }

        this.connectIps = new com.amazonaws.internal.SdkInternalList<String>(connectIps);
    }
678326
public static boolean verifyTopology(TopologyAPI.Topology topology) {
    if (!topology.hasName() || topology.getName().isEmpty()) {
      LOG.severe("Missing topology name");
      return false;
    }
    if (topology.getName().contains(".") || topology.getName().contains("/")) {
      LOG.severe("Invalid topology name. Topology name shouldn't have . or /");
      return false;
    }

    // Only verify RAM map string well-formed.
    getComponentRamMapConfig(topology);
    // Verify all bolts input streams exist. First get all output streams.
    Set<String> outputStreams = new HashSet<>();
    for (TopologyAPI.Spout spout : topology.getSpoutsList()) {
      for (TopologyAPI.OutputStream stream : spout.getOutputsList()) {
        outputStreams.add(
            stream.getStream().getComponentName() + "/" + stream.getStream().getId());
      }
    }
    for (TopologyAPI.Bolt bolt : topology.getBoltsList()) {
      for (TopologyAPI.OutputStream stream : bolt.getOutputsList()) {
        outputStreams.add(
            stream.getStream().getComponentName() + "/" + stream.getStream().getId());
      }
    }
    // Match output streams with input streams.
    for (TopologyAPI.Bolt bolt : topology.getBoltsList()) {
      for (TopologyAPI.InputStream stream : bolt.getInputsList()) {
        String key = stream.getStream().getComponentName() + "/" + stream.getStream().getId();
        if (!outputStreams.contains(key)) {
          LOG.severe("Invalid input stream " + key + " existing streams are " + outputStreams);
          return false;
        }
      }
    }
    // TODO(nbhagat): Should we enforce all output stream must be consumed?

    return true;
  }
273033
public void setTransitGatewayAttachmentPropagations(java.util.Collection<TransitGatewayAttachmentPropagation> transitGatewayAttachmentPropagations) {
        if (transitGatewayAttachmentPropagations == null) {
            this.transitGatewayAttachmentPropagations = null;
            return;
        }

        this.transitGatewayAttachmentPropagations = new com.amazonaws.internal.SdkInternalList<TransitGatewayAttachmentPropagation>(
                transitGatewayAttachmentPropagations);
    }
1053267
@Override
   public synchronized void updateCurrentTopology(List<Address> newMembers) {
      // The current topology might be null just after a joiner became the coordinator
      if (currentTopology == null) {
         createInitialCacheTopology();
      }
      ConsistentHashFactory<ConsistentHash> consistentHashFactory = getJoinInfo().getConsistentHashFactory();
      int topologyId = currentTopology.getTopologyId();
      int rebalanceId = currentTopology.getRebalanceId();
      ConsistentHash currentCH = currentTopology.getCurrentCH();
      ConsistentHash pendingCH = currentTopology.getPendingCH();
      if (!needConsistentHashUpdate()) {
         log.tracef("Cache %s members list was updated, but the cache topology doesn't need to change: %s",
               cacheName, currentTopology);
         return;
      }

      if (newMembers.isEmpty()) {
         log.tracef("Cache %s no longer has any members, removing topology", cacheName);
         setCurrentTopology(null);
         setStableTopology(null);
         rebalanceConfirmationCollector = null;
         status = ComponentStatus.INSTANTIATED;

         return;
      }


      List<Address> newCurrentMembers = pruneInvalidMembers(currentCH.getMembers());
      ConsistentHash newCurrentCH, newPendingCH = null;
      CacheTopology.Phase newPhase = CacheTopology.Phase.NO_REBALANCE;
      List<Address> actualMembers;
      if (newCurrentMembers.isEmpty()) {
         // All the current members left, try to replace them with the joiners
         log.tracef("All current members left, re-initializing status for cache %s", cacheName);
         rebalanceConfirmationCollector = null;

         newCurrentMembers = getExpectedMembers();
         actualMembers = newCurrentMembers;
         newCurrentCH = joinInfo.getConsistentHashFactory().create(
               joinInfo.getHashFunction(), joinInfo.getNumOwners(), joinInfo.getNumSegments(),
               newCurrentMembers, getCapacityFactors());
      } else {
         // ReplicatedConsistentHashFactory allocates segments to all its members, so we can't add any members here
         newCurrentCH = consistentHashFactory.updateMembers(currentCH, newCurrentMembers, getCapacityFactors());
         actualMembers = newCurrentMembers;
         if (pendingCH != null) {
            newPhase = currentTopology.getPhase();
            List<Address> newPendingMembers = pruneInvalidMembers(pendingCH.getMembers());
            newPendingCH = consistentHashFactory.updateMembers(pendingCH, newPendingMembers, getCapacityFactors());
            actualMembers = pruneInvalidMembers(newPendingMembers);
         }
      }
      // Losing members during state transfer could lead to a state where we have more than two topologies
      // concurrently in the cluster. We need to make sure that all the topologies are compatible (properties set
      // in CacheTopology docs hold) - we just remove lost members.
      CacheTopology newTopology = new CacheTopology(topologyId + 1, rebalanceId, newCurrentCH, newPendingCH,
            newPhase, actualMembers, persistentUUIDManager.mapAddresses(actualMembers));
      setCurrentTopology(newTopology);

      if (rebalanceConfirmationCollector != null) {
         // The node that will cancel the state transfer because of another topology update won't send topology confirm
         log.debugf("Cancelling topology confirmation %s because of another topology update", rebalanceConfirmationCollector);
         rebalanceConfirmationCollector = null;
      }

      CLUSTER.updatingTopology(cacheName, newTopology, availabilityMode);
      eventLogger.info(EventLogCategory.CLUSTER, MESSAGES.cacheMembersUpdated(
         actualMembers, newTopology.getTopologyId()));
      clusterTopologyManager.broadcastTopologyUpdate(cacheName, newTopology, availabilityMode,
            isTotalOrder(), isDistributed());
   }
767066
@RequestMapping(value = "branches/{branchId}/template/connect", method = RequestMethod.GET)
    public Form connectTemplateInstance(@PathVariable ID branchId) {
        // Loads the branch
        Branch branch = structureService.getBranch(branchId);
        // List of templates
        Collection<LoadedBranchTemplateDefinition> templateDefinitions = branchTemplateService.getTemplateDefinitions(branch.getProject());
        // List of sync form per template
        return Form.create()
                .with(
                        ServiceConfigurator.of("connectionRequest")
                                .label("Template")
                                .help("Template to connect to")
                                .sources(
                                        templateDefinitions.stream()
                                                .map(lbtd -> new ServiceConfigurationSource(
                                                        lbtd.getBranch().getId().toString(),
                                                        lbtd.getBranch().getName(),
                                                        lbtd.getForm()
                                                ))
                                                .collect(Collectors.toList())
                                )
                );
    }
666723
function stage(transformer, opts) {
  var stage = transformer.metadata.stage;
  if (stage != null && stage >= opts.stage) return true;
}
592912
public Boolean setExecutionState(
      ExecutionEnvironment.ExecutionState executionState, String topologyName) {
    return awaitResult(delegate.setExecutionState(executionState, topologyName));
  }
81459
public void setBccAddresses(java.util.Collection<String> bccAddresses) {
        if (bccAddresses == null) {
            this.bccAddresses = null;
            return;
        }

        this.bccAddresses = new com.amazonaws.internal.SdkInternalList<String>(bccAddresses);
    }