get local node's tasks

@return Map: [port, LocalAssignment]
979740
@SuppressWarnings("unused")
    private Map<Integer, LocalAssignment> readMyTasks(StormClusterState stormClusterState, String topologyId,
                                                      String supervisorId, Assignment assignmentInfo) throws Exception {
        Map<Integer, LocalAssignment> portTasks = new HashMap<>();

        Set<ResourceWorkerSlot> workers = assignmentInfo.getWorkers();
        if (workers == null) {
            LOG.error("No worker found for assignment {}!", assignmentInfo);
            return portTasks;
        }

        for (ResourceWorkerSlot worker : workers) {
            if (!supervisorId.equals(worker.getNodeId())) {
                continue;
            }
            portTasks.put(worker.getPort(), new LocalAssignment(
                    topologyId, worker.getTasks(), Common.topologyIdToName(topologyId), worker.getMemSize(),
                    worker.getCpu(), worker.getJvm(), assignmentInfo.getTimeStamp()));
        }

        return portTasks;
    }
507705
public Iterator<JobTaskVertex> getTaskVertices() {

		final Collection<JobTaskVertex> coll = this.taskVertices.values();

		return coll.iterator();
	}
1081851
public Map<?, ?> getAttachmentsForLocale() {

        return CmsCollectionsGenericWrapper.createLazyMap(new Transformer() {

            @SuppressWarnings("synthetic-access")
            public Object transform(Object arg0) {

                String localeStr = (String)arg0;
                return CmsJspContentAttachmentsBean.getAttachmentsForLocale(m_cms, m_resource, localeStr);
            }
        });
    }
348382
public List<TaskState> getTaskStates() {
    return ImmutableList.<TaskState>builder().addAll(this.taskStates.values()).build();
  }
482867
public List<LocaleEncodingMappingType<LocaleEncodingMappingListType<T>>> getAllLocaleEncodingMapping()
   {
      List<LocaleEncodingMappingType<LocaleEncodingMappingListType<T>>> list = new ArrayList<LocaleEncodingMappingType<LocaleEncodingMappingListType<T>>>();
      List<Node> nodeList = childNode.get("locale-encoding-mapping");
      for(Node node: nodeList)
      {
         LocaleEncodingMappingType<LocaleEncodingMappingListType<T>>  type = new LocaleEncodingMappingTypeImpl<LocaleEncodingMappingListType<T>>(this, "locale-encoding-mapping", childNode, node);
         list.add(type);
      }
      return list;
   }
582389
public List<LocaleEncodingMappingListType<WebFragmentDescriptor>> getAllLocaleEncodingMappingList()
   {
      List<LocaleEncodingMappingListType<WebFragmentDescriptor>> list = new ArrayList<LocaleEncodingMappingListType<WebFragmentDescriptor>>();
      List<Node> nodeList = model.get("locale-encoding-mapping-list");
      for(Node node: nodeList)
      {
         LocaleEncodingMappingListType<WebFragmentDescriptor>  type = new LocaleEncodingMappingListTypeImpl<WebFragmentDescriptor>(this, "locale-encoding-mapping-list", model, node);
         list.add(type);
      }
      return list;
   }
582075
@java.lang.Deprecated
  public java.util.Map<java.lang.Integer, java.lang.String> getTasks() {
    return getTasksMap();
  }
1184955
public static Map<String, Object> get() {
		Map<String, Object> map = JKThreadLocal.thread.get();
		if (map == null) {
			map = new LinkedHashMap<String, Object>();
			JKThreadLocal.set(map);
		}
		return map;
	}
733704
public function locally()
    {
        list(
            $this->item,
            $this->itemIterator,
            $this->itemIteratorTotal,
            $this->popIndex,
            $this->upIndex,
            $this->currentIndex
        ) = $this->itemStack[$this->localIndex];

        // Remember any  un-completed (resetLocalScope hasn't been called) lookup chain. Even if there isn't an
        // un-completed chain we need to store an empty item, as resetLocalScope doesn't know the difference later
        $this->localStack[] = array_splice($this->itemStack, $this->localIndex + 1);

        return $this;
    }
70336
public Collection<String> getLocalPlacements() {
        List<String> placements = Lists.newArrayList();
        for (String placementName : _placementFactory.getValidPlacements()) {
            Placement placement;
            try {
                placement = get(placementName);
            } catch (UnknownPlacementException e) {
                continue;  // Placement must live in another data center.
            }
            placements.add(placement.getName());
        }
        return placements;
    }
486146
public Map<String, PortMapping> ports() {
    final ImmutableMap.Builder<String, PortMapping> builder = ImmutableMap.builder();
    for (final Map.Entry<String, PortMapping> e : job.getPorts().entrySet()) {
      final PortMapping mapping = e.getValue();
      builder.put(e.getKey(), mapping.hasExternalPort()
                              ? mapping
                              : mapping.withExternalPort(checkNotNull(ports.get(e.getKey()))));
    }
    return builder.build();
  }
872520
public function getConnectorsAsArray()
    {
        // Iterate over the connectors nodes and sort them into an array
        $connectors = array();
        /** @var \AppserverIo\Appserver\Core\Api\Node\ConnectorNode $connectorNode */
        foreach ($this->getConnectors() as $connectorNode) {
            // Restructure to an array
            $connectors[] = array(
                'name' => $connectorNode->getName(),
                'type' => $connectorNode->getType(),
                'params' => $connectorNode->getParamsAsArray()
            );
        }

        // Return what we got
        return $connectors;
    }
116636
def task_assignments(self):
        ''''''
        url = str.format(
            'projects/{}/task_assignments',
            self.id
        )
        response = self.hv.get_request(url)
        return [TaskAssignment(self.hv, tj['task_assignment']) for tj in response]
38237
public Collection<String> getParticipantNodes() throws Exception
    {
        return LockInternals.getParticipantNodes(internals.getClient(), basePath, internals.getLockName(), internals.getDriver());
    }
1315103
public function getLocaleList()
    {
        if (null === $this->localeList) {
            $this->setLocaleList(LocaleUtils::getNamedList(Locale::getDefault()));
        }

        return $this->localeList;
    }
1080418
def results
      return self.get_jobs.map do |task|
        next if task == nil
        next if task.server == nil
        {
          :job_id => task.job_id,
          :name   => task.info[0],
          :host   => task.server.name,
          :status => task.status,
          :error  => task.error,
          :total  => self.get_total_execution_time(task.status, task.time_start, task.time_end),
          :start  => task.time_start,
          :end    => task.time_end,
          :worker => task
        }
      end
    end
1370984
public function getLocales()
    {
        $locales = $this->serviceManager->get('playgroundcore_locale_service')->getLocaleMapper()->findAll();
        $localesForm = array();
        foreach ($locales as $key => $locale) {
            $localesForm[$locale->getLocale()] = $locale->getName(). " (".$locale->getLocale().")";
        }
        return $localesForm;
    }