Allocates the containers specified by the constructor.

@return the allocated containers
426517
public List<Container> allocateContainers() throws Exception {
    for (int attempt = 0; attempt < MAX_WORKER_CONTAINER_REQUEST_ATTEMPTS; attempt++) {
      LOG.debug("Attempt {} of {} to allocate containers",
          attempt, MAX_WORKER_CONTAINER_REQUEST_ATTEMPTS);
      int numContainersToRequest = mTargetNumContainers - mAllocatedContainerHosts.size();
      LOG.debug("Requesting {} containers", numContainersToRequest);
      mOutstandingContainerRequestsLatch = new CountDownLatch(numContainersToRequest);
      requestContainers();
      // Wait for all outstanding requests to be responded to before beginning the next round.
      mOutstandingContainerRequestsLatch.await();
      if (mAllocatedContainerHosts.size() == mTargetNumContainers) {
        break;
      }
    }
    if (mAllocatedContainers.size() != mTargetNumContainers) {
      throw new RuntimeException(String.format("Failed to allocate %d %s containers",
          mTargetNumContainers, mContainerName));
    }
    return mAllocatedContainers;
  }
754171
public Set<String> keySet() {
		// prepare container
		HashSet<String> set = new HashSet<String>();
		// add container keys
		set.addAll(container.keySet());
		// add cache keys
		set.addAll(cache.keySet());
		
		return set;
	}
1093168
public Entries<K, V> entries () {
		if (entries == null)
			entries = new Entries(this);
		else
			entries.reset();
		return entries;
	}
398363
@Override
    public long getAllocatedHostObjects() {
        AtomicLong counter = new AtomicLong(0);
        for (Long threadId : zeroAllocations.keySet()) {
            counter.addAndGet(zeroAllocations.get(threadId).size());
        }
        return counter.get();
    }
964449
public function getContainersAsArray()
    {

        // initialize the array for the containers
        $containers = array();

        // iterate over all found containers and assemble the array
        /** @var \AppserverIo\Psr\ApplicationServer\Configuration\ContainerConfigurationInterface $container */
        foreach ($this->getContainers() as $container) {
            $containers[$container->getName()] = $container;
        }

        // return the array with the containers
        return $containers;
    }
992938
public T alloc() {
    if (numFree == 0) {
      Preconditions.checkState(numAlloc < maxSize);
      numAlloc++;
      return allocator.get();
    } else {
      T item = free[numFree - 1];
      numFree--;
      return item;
    }
  }
404200
public PooledByteBuffer allocate() {
        final Queue<Slice> sliceQueue = this.sliceQueue;
        final Slice slice = sliceQueue.poll();
        if (slice == null && (maxRegions <= 0 || regionUpdater.getAndIncrement(this) < maxRegions)) {
            final int bufferSize = this.bufferSize;
            final int buffersPerRegion = this.buffersPerRegion;
            final ByteBuffer region = allocator.allocate(buffersPerRegion * bufferSize);
            int idx = bufferSize;
            for (int i = 1; i < buffersPerRegion; i ++) {
                sliceQueue.add(new Slice(region, idx, bufferSize));
                idx += bufferSize;
            }
            final Slice newSlice = new Slice(region, 0, bufferSize);
            return new PooledByteBuffer(newSlice, newSlice.slice(), sliceQueue);
        }
        if (slice == null) {
            return null;
        }
        return new PooledByteBuffer(slice, slice.slice(), sliceQueue);
    }
392774
public IPv6AddressPool allocate()
    {
        if (!isExhausted())
        {
            // get the first range of free subnets, and take the first subnet of that range
            final IPv6AddressRange firstFreeRange = freeRanges.first();
            final IPv6Network allocated = IPv6Network.fromAddressAndMask(firstFreeRange.getFirst(), allocationSubnetSize);

            return doAllocate(allocated, firstFreeRange);
        }
        else
        {
            // exhausted
            return null;
        }
    }
11358
@Override
  public PackingPlan pack() {
    PackingPlanBuilder planBuilder = newPackingPlanBuilder(null);

    // Get the instances using FFD allocation
    try {
      planBuilder = getFFDAllocation(planBuilder);
    } catch (ConstraintViolationException e) {
      throw new PackingException("Could not allocate all instances to packing plan", e);
    }

    return planBuilder.build();
  }
1040768
public static List<String> getResources() {
        File resources = new File(STORAGE_PATH + File.separator + "/resources");
        File[] children = resources.listFiles();

        if (children == null) {
            return new ArrayList<String>();
        }

        List<String> storages = new ArrayList<String>();

        for (int i = 0; i < children.length; i++) {
            if (children[i].isDirectory())
                storages.add(children[i].getName());
        }

        return storages;
    }
490245
public ConstructorFilter build() {
        if(filters.isEmpty()) {
            throw new IllegalStateException("No filter specified.");
        }
        if(filters.size() == 1) {
            return filters.get(0);
        }
        ConstructorFilter[] methodFilters = new ConstructorFilter[filters.size()];
        filters.toArray(methodFilters);
        return new ConstructorFilterList(methodFilters);
    }
1151823
@Override
	public List<MemorySegment> allocatePages(AbstractInvokable owner, int numPages) throws MemoryAllocationException {
		final ArrayList<MemorySegment> segs = new ArrayList<MemorySegment>(numPages);
		allocatePages(owner, segs, numPages);
		return segs;
	}
516874
public Vector<Object> marshallize()
    {
        Vector<Object> parameters = new Vector<Object>();
        parameters.add(PROJECT_NAME_IDX, name);
        return parameters;
    }
1353027
public PackingPlan build() {
    assertResourceSettings();
    Set<PackingPlan.ContainerPlan> containerPlans = buildContainerPlans(this.containers);
    return new PackingPlan(topologyId, containerPlans);
  }
392521
public Vector<Object> marshallize()
    {
        Vector<Object> parameters = new Vector<Object>();        
        parameters.add(REFERENCE_REQUIREMENT_IDX, requirement.marshallize());
        parameters.add(REFERENCE_SPECIFICATION_IDX, specification.marshallize());
        parameters.add(REFERENCE_SUT_IDX, systemUnderTest.marshallize());
        parameters.add(REFERENCE_SECTIONS_IDX, StringUtils.defaultString(sections));
        
        parameters.add(REFERENCE_LAST_EXECUTION_IDX, lastExecution != null ? lastExecution.marshallize() : Execution.none().marshallize());
        return parameters;
    }
461194
public java.util.List<ImageDiskContainer> getDiskContainers() {
        if (diskContainers == null) {
            diskContainers = new com.amazonaws.internal.SdkInternalList<ImageDiskContainer>();
        }
        return diskContainers;
    }
464463
protected Partitions loadPartitions() {

        Iterable<RedisURI> topologyRefreshSource = getTopologyRefreshSource();

        try {
            return doLoadPartitions(topologyRefreshSource);
        } catch (RedisException e) {

            // Attempt recovery using initial seed nodes
            if (useDynamicRefreshSources() && topologyRefreshSource != initialUris) {

                try {
                    return doLoadPartitions(initialUris);
                } catch (RedisConnectionException e2) {

                    RedisException exception = new RedisException(getTopologyRefreshErrorMessage(initialUris), e2);
                    exception.addSuppressed(e);

                    throw exception;
                }
            }

            if (e.getClass().equals(RedisException.class)) {
                throw e;
            }

            throw new RedisException(getTopologyRefreshErrorMessage(topologyRefreshSource), e);
        }
    }