Returns the cache of deployments for the given application, creating one if it doesn't exist .
@param applicationId The id of the application for the cache of deployments
@return The cache of deployments for the given application
421673
public DeploymentCache deployments(long applicationId)
    {
        DeploymentCache cache = deployments.get(applicationId);
        if(cache == null)
            deployments.put(applicationId, cache = new DeploymentCache(applicationId));
        return cache;
    }
740766
@Override
	public byte[] getAppIdCeil(String appId) {

		int appIdCode = codecer.findId(APP_ID, appId).intValue();
		ByteBuffer byteBuffer = ByteBuffer.allocate(12);
		putUnsignedShort(byteBuffer, appIdCode);
		putUnsignedShort(byteBuffer, Integer.MAX_VALUE);
		putUnsignedShort(byteBuffer, Integer.MAX_VALUE);
		putUnsignedShort(byteBuffer, Integer.MAX_VALUE);
		putUnsignedShort(byteBuffer, Integer.MAX_VALUE);
		putUnsignedShort(byteBuffer, Integer.MAX_VALUE);
		
		return byteBuffer.array();
	}
1151013
protected static ArrayCache getArrayCache() {
        ArrayCache cache = (ArrayCache) AppContext.getAppContext().get(ArrayCache.class);

        if (cache == null) {
            cache = new ArrayCache();
            AppContext.getAppContext().put(ArrayCache.class, cache);
        }

        return cache;
    }
623463
@Override
    public InstanceInfo getInstanceByAppAndId(String appName, String id) {
        return this.getInstanceByAppAndId(appName, id, true);
    }
509186
private void findDeploymentAddress(final String deploymentID, Handler<AsyncResult<String>> resultHandler) {
    context.execute(new Action<String>() {
      @Override
      public String perform() {
        synchronized (deployments) {
          JsonObject locatedInfo = null;
          Collection<String> sdeploymentsInfo = deployments.get(cluster);
          for (String sdeploymentInfo : sdeploymentsInfo) {
            JsonObject deploymentInfo = new JsonObject(sdeploymentInfo);
            if (deploymentInfo.getString("id").equals(deploymentID)) {
              locatedInfo = deploymentInfo;
              break;
            }
          }
          if (locatedInfo != null) {
            return locatedInfo.getString("address");
          }
          return null;
        }
      }
    }, resultHandler);
  }
410161
function cacheApplication() {
        $this->log("Downloading application...");
        $app = Config::instance()->application->apiClient()->get("application", array("definition" => "true"));
        $this->cache(Application::cacheKey(), json_encode($app));
        $this->log("Application has been cached.");
        return $app;
    }
1067063
public function getCredentialsByApplicationId($applicationId)
    {
        return $this->createCommand()
            ->setRequest(
                $this->client->get(Url::factory('application')->setQuery(array('applicationId' => $applicationId)))
            )
            ->setResponseClass('Maba\OAuthCommerceInternalClient\Entity\ApplicationPassword[]')
        ;
    }
1156403
public static String getApplicationPID(BundleContext bundleContext, String applicationName) {
        String applicationPID = null;

        if (FrameworkState.isValid()) {
            ServiceReference<?> appRef = getApplicationServiceRef(bundleContext, applicationName);
            if (appRef != null) {
                //not actually sure what the difference is between service.pid and ibm.extends.source.pid but this is the way it is done everywhere else!
                applicationPID = (String) appRef.getProperty(Constants.SERVICE_PID);
                String sourcePid = (String) appRef.getProperty("ibm.extends.source.pid");
                if (sourcePid != null) {
                    applicationPID = sourcePid;
                }
            }
        }
        return applicationPID;

    }
381621
public DbOrganization getOrganization(final String organizationId) {
        final DbOrganization dbOrganization = repositoryHandler.getOrganization(organizationId);

        if(dbOrganization == null){
            throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
                    .entity("Organization " + organizationId + " does not exist.").build());
        }

        return dbOrganization;
    }
1019699
public Collection<ApplicationHost> list(long applicationId, List<String> queryParams)
    {
        return HTTP.GET(String.format("/v2/applications/%d/hosts.json", applicationId), null, queryParams, APPLICATION_HOSTS).get();
    }
1192711
public OvhApplication api_application_applicationId_GET(Long applicationId) throws IOException {
		String qPath = "/me/api/application/{applicationId}";
		StringBuilder sb = path(qPath, applicationId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhApplication.class);
	}
779595
public Optional<ApplicationInstance> show(long applicationId, long instanceId)
    {
        return HTTP.GET(String.format("/v2/applications/%d/instances/%d.json", applicationId, instanceId), APPLICATION_INSTANCE);
    }
849027
@Export
	public Map getMap(String applicationId, String mapId) {
		HashMap<String, Map> application = maps.get(applicationId);
		if (null == application) {
			return null;
		}
		return application.get(mapId);
	}
1179073
public static ApplicationEnvironment get() {
        return INSTANCE.updateAndGet((env) -> {
            if (env != null) {
                return env;
            }

            try (AutoCloseable handle = Performance.time("Load application environment")) {
                return new ApplicationEnvironment();
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
258617
protected void appendAppId(ApplicationId appId, Message m) {
    if (appId == null) {
      return;
    }

    // check if any application-id avp is already present.
    // we could use m.getApplicationIdAvps().size() > 0 but this should spare a few cpu cycles
    for (Avp avp : m.getAvps()) {
      int code = avp.getCode();
      if (code == Avp.ACCT_APPLICATION_ID || code == Avp.AUTH_APPLICATION_ID || code == Avp.VENDOR_SPECIFIC_APPLICATION_ID) {
        return;
      }
    }

    if (appId.getVendorId() == 0) {
      if (appId.getAcctAppId() != 0) {
        m.getAvps().addAvp(Avp.ACCT_APPLICATION_ID, appId.getAcctAppId(), true, false, true);
      }
      if (appId.getAuthAppId() != 0) {
        m.getAvps().addAvp(Avp.AUTH_APPLICATION_ID, appId.getAuthAppId(), true, false, true);
      }
    }
    else {
      AvpSet avp = m.getAvps().addGroupedAvp(Avp.VENDOR_SPECIFIC_APPLICATION_ID, true, false);
      avp.addAvp(Avp.VENDOR_ID, appId.getVendorId(), true, false, true);
      if (appId.getAuthAppId() != 0) {
        avp.addAvp(Avp.AUTH_APPLICATION_ID, appId.getAuthAppId(), true, false, true);
      }
      if (appId.getAcctAppId() != 0) {
        avp.addAvp(Avp.ACCT_APPLICATION_ID, appId.getAcctAppId(), true, false, true);
      }
    }
  }
597107
public Application getRegisteredApplications(String appName) {
        return appNameApplicationMap.get(appName.toUpperCase(Locale.ROOT));
    }
335280
public com.google.appengine.v1.Deployment getDeployment() {
    return deployment_ == null ? com.google.appengine.v1.Deployment.getDefaultInstance() : deployment_;
  }