Get the configured minimum allocation for a given {@link ResourceType}
in a given pool group
@param poolGroupName the name of the pool group
@param type the type of the resource
@return the minimum allocation for the resource in a pool group
547377
public synchronized int getPoolGroupMinimum(String poolGroupName,
                                              ResourceType type) {
    Integer min = (typePoolGroupNameToMin == null) ? null :
        typePoolGroupNameToMin.get(type, poolGroupName);
    return min == null ? 0 : min;
  }
139123
public static UserExecutorConfiguration of(ExecutorType type) {
        ArgumentUtils.check("type", type).notNull();
        UserExecutorConfiguration configuration = new UserExecutorConfiguration();
        configuration.type = type;
        return configuration;
    }
1324755
public com.google.api.ads.adwords.axis.v201809.cm.AdGroupCriterionLimitExceededCriteriaLimitType getLimitType() {
        return limitType;
    }
251522
public static function getInstance($poolName = null, $queryType = QueryType::WRITE): IDb
    {
        return PoolManager::getRequestContextResource(static::parsePoolName($poolName, $queryType))->getInstance();
    }
505735
public Observable<ClusterInner> getByResourceGroupAsync(String resourceGroupName, String clusterName) {
        return getByResourceGroupWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1<ServiceResponse<ClusterInner>, ClusterInner>() {
            @Override
            public ClusterInner call(ServiceResponse<ClusterInner> response) {
                return response.body();
            }
        });
    }
863683
public ResourceRequestInfo getPendingRequestOnHost(
    String host, ResourceType type) {
    Context c = getContext(type);
    List<ResourceRequestInfo> hostReqs = c.hostToPendingRequests.get(host);
    if (hostReqs != null) {
      // Returning the first element in the list makes the subsequent
      // call to Utilities.removeReference() very fast.
      return hostReqs.get(0);
    }
    return null;
  }
772061
public List<GROUP> getGroups(List<RESOURCE> resources) {

        List<RESOURCE> sortedResources = new ArrayList<RESOURCE>(resources);
        Collections.sort(sortedResources, new SortingComparator());
        Map<Long, Integer> daysMap = computeDaysForResources(sortedResources);
        Map<GroupAge, List<RESOURCE>> resourcesByAge = partitionPublishResourcesByAge(sortedResources, daysMap);
        List<List<RESOURCE>> youngGroups = partitionYoungResources(resourcesByAge.get(GroupAge.young));
        List<List<RESOURCE>> mediumGroups = partitionMediumResources(resourcesByAge.get(GroupAge.medium), daysMap);
        List<RESOURCE> oldGroup = resourcesByAge.get(GroupAge.old);
        List<GROUP> resultGroups = new ArrayList<GROUP>();
        for (List<RESOURCE> groupRes : youngGroups) {
            String name = getPublishGroupName(groupRes, GroupAge.young);
            resultGroups.add(createGroup(name, groupRes));
        }
        for (List<RESOURCE> groupRes : mediumGroups) {
            String name = getPublishGroupName(groupRes, GroupAge.medium);
            resultGroups.add(createGroup(name, groupRes));
        }
        if (!oldGroup.isEmpty()) {
            String oldName = getPublishGroupName(oldGroup, GroupAge.old);
            resultGroups.add(createGroup(oldName, oldGroup));
        }
        return resultGroups;
    }
285311
public static StatusGroup get(final String _typeName)
        throws CacheReloadException
    {
        final Cache<String, StatusGroup> cache = InfinispanCache.get().<String, StatusGroup>getCache(
                        Status.NAMECACHE4GRP);
        if (!cache.containsKey(_typeName)) {
            Status.getStatusGroupFromDB(Status.SQL_NAME4GRP, _typeName);
        }
        return cache.get(_typeName);
    }
1078593
public static systemgroup_binding get(nitro_service service, String groupname) throws Exception{
		systemgroup_binding obj = new systemgroup_binding();
		obj.set_groupname(groupname);
		systemgroup_binding response = (systemgroup_binding) obj.get_resource(service);
		return response;
	}
1134413
public Group getGroup(String groupName) {
        Group result = null;
        for (Group item : getGroupsList()) {
            if (item.getName().equals(groupName)) {
                result = item;
            }
        }
        return result;
    }
335034
public static Pool createPool(String type, ConnectionManager cm, PoolConfiguration pc)
   {
      if (type == null || type.equals(""))
         return new DefaultPool(cm, pc);

      type = type.toLowerCase(Locale.US);
      
      switch (type)
      {
         case "default":
            return new DefaultPool(cm, pc);
         case "stable":
            return new StablePool(cm, pc);
         default:
         {
            Class<? extends Pool> clz = customPoolTypes.get(type);

            if (clz == null)
               throw new RuntimeException(type + " can not be found");

            try
            {
               Constructor constructor = clz.getConstructor(ConnectionManager.class, PoolConfiguration.class);
               return (Pool)constructor.newInstance(cm, pc);
            }
            catch (Exception e)
            {
               throw new RuntimeException(type + " can not be created", e);
            }
         }
      }
   }
332022
public PooledExecutionServiceConfigurationBuilder pool(String alias, int minSize, int maxSize) {
    PooledExecutionServiceConfigurationBuilder other = new PooledExecutionServiceConfigurationBuilder(this);
    other.pools.add(new Pool(alias, minSize, maxSize));
    return other;
  }
1296828
public static Resource getResourceByType(int resourceType) {
    for (Resource resource : Resources.values()) {
      if (resource.resourceType() == resourceType) {
        return resource;
      }
    }
    return null;
  }
1197100
public PoolSchedulable getPool(PoolInfo poolInfo) {
    PoolSchedulable pool = nameToMap.get(poolInfo);
    if (pool == null) {
      pool = new PoolSchedulable(poolInfo, getType(), configManager);
      PoolSchedulable prevPool = nameToMap.putIfAbsent(poolInfo, pool);
      if (prevPool != null) {
        pool = prevPool;
      }
    }
    return pool;
  }
329876
public Integer getCount(ResourceType resourceType) {
    Integer count = typeToCountMap.get(resourceType);
    if (count == null) {
      return 0;
    } else {
      return count;
    }
  }
6326
public Map<PoolInfo, Long> getTypePoolInfoAveFirstWaitMs(ResourceType type) {
    Map<PoolInfo, WaitCount> poolInfoWaitCount =
        new HashMap<PoolInfo, WaitCount>();
    for (Session session : sessions.values()) {
      synchronized (session) {
        if (!session.isDeleted()) {
          Long wait = session.getTypeFirstWaitMs(type);
          if (wait == null) {
            continue;
          }

          WaitCount waitCount = poolInfoWaitCount.get(session.getPoolInfo());
          if (waitCount == null) {
            poolInfoWaitCount.put(session.getPoolInfo(),
                                  new WaitCount(wait));
          } else {
            waitCount.addWaitMsecs(wait);
          }
        }
      }
    }
    Map<PoolInfo, Long> poolInfoWaitMs =
        new HashMap<PoolInfo, Long>(poolInfoWaitCount.size());
    for (Map.Entry<PoolInfo, WaitCount> entry : poolInfoWaitCount.entrySet()) {
      poolInfoWaitMs.put(entry.getKey(), entry.getValue().getAverageWait());
    }
    return poolInfoWaitMs;
  }
1367194
public AutoScalingGroup getAutoScalingGroup(String autoScalingGroupName) {
        Preconditions.checkArgument(autoScalingGroupName != null && !autoScalingGroupName.isEmpty());
        DescribeAutoScalingGroupsRequest req = new DescribeAutoScalingGroupsRequest();
        req.setAutoScalingGroupNames(Collections.singleton(autoScalingGroupName));
        DescribeAutoScalingGroupsResult result = this.autoScalingClient.describeAutoScalingGroups(req);
        if (result.getAutoScalingGroups().size() != 1) {
            throw new IllegalStateException("Found multiple auto scaling groups");
        }
        return result.getAutoScalingGroups().get(0);
    }