Returns the cache of labels for the given monitor, creating one if it doesn't exist .
@param monitorId The id of the monitor for the cache of labels
@return The cache of labels for the given monitor
770182
public LabelCache labels(String monitorId)
    {
        LabelCache cache = labels.get(monitorId);
        if(cache == null)
            labels.put(monitorId, cache = new LabelCache(monitorId));
        return cache;
    }
184824
private MonitorInformation getMonitorInformation(L location) {
		final K monitorKey = getLocationKey(location);
		MonitorInformation monitorInformation = monitorInformations.get(monitorKey);
		if (monitorInformation == null) {
			// Not found, let's call delegate
			if (delegate.isMonitored(location)) {
				monitorInformation = new MonitorInformation(true, delegate.getMonitor(location));
			} else {
				monitorInformation = NULL_MONITOR_INFORMATION;
			}
			monitorInformations.put(monitorKey, monitorInformation);
		}
		return monitorInformation;
	}
990057
public Label getLabelByName(String name) {
        for (Label label : labels) {
            if (name.equals(label.getName())) {
                return label;
            }
        }
        return null;
    }
1157692
private JLabel getFoundCountNameLabel() {
		if (foundCountNameLabel == null) {
			foundCountNameLabel = new JLabel();
			foundCountNameLabel.setText(Constant.messages.getString("spider.toolbar.found.label"));
		}
		return foundCountNameLabel;
	}
310290
public Integer getMonitorId(final MetricIdentity identity) throws IOException, HttpException {
		Preconditions.checkNotNull(identity);
		
		if (monitorIds.containsKey(identity)) {
			return monitorIds.get(identity);
		}
		
		long lastQuery = 0;
		
		if (lastQueries.containsKey(identity)) {
			lastQuery = lastQueries.get(identity);
		}
		
		long currentTimeMillis = System.currentTimeMillis();
		
		if (lastQuery + FIVE_MINUTES_MILLIS < currentTimeMillis) {
			try {
				lastQueries.put(identity, lastQuery);
				
				AppIdentity appIdentity = appIdentityService.getAppIdentity();
				
				if (appIdentity != null) {
					
					int monitorId = getMetricInfo(identity, appIdentity);
					
					LOGGER.debug("Metric {} monitor id: {}", identity, monitorId);
					
					if (0 < monitorId) {
						monitorIds.put(identity, monitorId);
					}
				}
			} catch (Throwable t) {
				LOGGER.info("Unable to determine monitor id for metric {}", identity, t);
			}
		}

		if (monitorIds.containsKey(identity)) {
			return monitorIds.get(identity);
		}
		
		return null;
	}
418117
public AlertChannelCache alertChannels(long policyId)
    {
        AlertChannelCache cache = channels.get(policyId);
        if(cache == null)
            channels.put(policyId, cache = new AlertChannelCache(policyId));
        return cache;
    }
569602
@Override
	public void cacheResult(CPDisplayLayout cpDisplayLayout) {
		entityCache.putResult(CPDisplayLayoutModelImpl.ENTITY_CACHE_ENABLED,
			CPDisplayLayoutImpl.class, cpDisplayLayout.getPrimaryKey(),
			cpDisplayLayout);

		finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G,
			new Object[] { cpDisplayLayout.getUuid(), cpDisplayLayout.getGroupId() },
			cpDisplayLayout);

		finderCache.putResult(FINDER_PATH_FETCH_BY_C_C,
			new Object[] {
				cpDisplayLayout.getClassNameId(), cpDisplayLayout.getClassPK()
			}, cpDisplayLayout);

		cpDisplayLayout.resetOriginalValues();
	}
340764
public static int getReadCount(final Long _userId)
    {
        int ret = 0;
        if (MessageStatusHolder.CACHE.userID2Read.containsKey(_userId)) {
            ret = MessageStatusHolder.CACHE.userID2Read.get(_userId);
        }
        return ret;
    }
1222496
public static Label newLabel(final String id, final String forId,
		final ResourceBundleKey resourceBundleKey, final Component component)
	{
		return ComponentFactory.newLabel(id, forId,
			ResourceModelFactory.newResourceModel(resourceBundleKey, component));
	}
1246639
private CachedProviderServiceInstance getCachedServiceInstance(
            String serviceName, String providerId) {
        try {
            read.lock();
            ServiceInstanceId id = new ServiceInstanceId(serviceName, providerId);
            return getCacheServiceInstances().get(id);
        } finally {
            read.unlock();
        }
    }
66974
function(id) {
      var t = this,
          components = t.model.get('components');
      return components.get(id).get('monitor');
    }
975437
public Integer getLabel(int i) {
		if (i < 0 || i >= labels.size())
			return -1;
		return labels.get(i);
	}
615634
public static Label newLabel(final String id, final String label)
	{
		return ComponentFactory.newLabel(id, Model.of(label));
	}
932787
public static String getCacheKey(String uniqueId, String appRealm) {
        StringBuilder cacheKey = new StringBuilder();
        if (uniqueId == null || appRealm == null) {
            cacheKey.append(CACHE_KEY_PREFIX);
        } else {
            cacheKey.append(CACHE_KEY_PREFIX).append(uniqueId).append(CACHE_KEY_SEPARATOR).append(appRealm);
        }
        return cacheKey.toString();
    }
1104131
public String getFormatCode(long id)
    {
        if(numFmts == null)
            cacheFormatCodes();
        return (String)numFmts.get(new Long(id));
    }
881342
public <X extends SchemaConcept> X getCachedSchemaConcept(Label label) {
        //noinspection unchecked
        return (X) schemaConceptCache.get(label);
    }
469045
public static ZoneId getZoneId(String zoneId) {
        return JMMap
                .getOrPutGetNew(zoneIdCache, zoneId, () -> ZoneId.of(zoneId));
    }