/*
(non-Javadoc)

@see com.ibm.websphere.cache.CacheAdminMBean#getCacheStatisticNames(java.lang.String)
174786
@Override
    public String[] getCacheStatisticNames(String cacheInstance) throws AttributeNotFoundException {
        DCache cache = getCache(cacheInstance);
        return getCacheStatisticNames(cache);
    }
1349057
public static ArrayList getServletCacheInstanceNames() {
        ArrayList list = null;
        if (ServerCache.servletCacheEnabled == false) {
            list = new ArrayList();
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "CacheMonitor: Servlet Cache Service has not been started.");

        } else {
            list = getCacheService().getServletCacheInstanceNames();
        }
        return list;
    }
944871
@SuppressWarnings("unchecked")
    private Map<String, Object> readCachedETags() {
        File cachedETagsFile = getCachedETagsFile();
        Map<String, Object> cachedETags;
        if (cachedETagsFile.exists()) {
            JsonSlurper slurper = new JsonSlurper();
            cachedETags = (Map<String, Object>)slurper.parse(cachedETagsFile, "UTF-8");
        } else {
            cachedETags = new LinkedHashMap<String, Object>();
        }
        return cachedETags;
    }
1252767
public static cachepolicy_stats get(nitro_service service, String policyname) throws Exception{
		cachepolicy_stats obj = new cachepolicy_stats();
		obj.set_policyname(policyname);
		cachepolicy_stats response = (cachepolicy_stats) obj.stat_resource(service);
		return response;
	}
173879
@NonNull
  public CacheStats plus(@NonNull CacheStats other) {
    return new CacheStats(
        hitCount + other.hitCount,
        missCount + other.missCount,
        loadSuccessCount + other.loadSuccessCount,
        loadFailureCount + other.loadFailureCount,
        totalLoadTime + other.totalLoadTime,
        evictionCount + other.evictionCount,
        evictionWeight + other.evictionWeight);
  }
1356546
public static String[] getMethodSigsCache(String serviceName, String methodName) {
        ConcurrentHashMap<String, String[]> methods = NOT_OVERLOAD_METHOD_SIGS_CACHE.get(serviceName);
        return methods == null ? null : methods.get(methodName);
    }
1356033
private DnsServerAddressStream getNameServersFromCache(String hostname) {
        int len = hostname.length();

        if (len == 0) {
            // We never cache for root servers.
            return null;
        }

        // We always store in the cache with a trailing '.'.
        if (hostname.charAt(len - 1) != '.') {
            hostname += ".";
        }

        int idx = hostname.indexOf('.');
        if (idx == hostname.length() - 1) {
            // We are not interested in handling '.' as we should never serve the root servers from cache.
            return null;
        }

        // We start from the closed match and then move down.
        for (;;) {
            // Skip '.' as well.
            hostname = hostname.substring(idx + 1);

            int idx2 = hostname.indexOf('.');
            if (idx2 <= 0 || idx2 == hostname.length() - 1) {
                // We are not interested in handling '.TLD.' as we should never serve the root servers from cache.
                return null;
            }
            idx = idx2;

            DnsServerAddressStream entries = authoritativeDnsServerCache().get(hostname);
            if (entries != null) {
                // The returned List may contain unresolved InetSocketAddress instances that will be
                // resolved on the fly in query(....).
                return entries;
            }
        }
    }
552397
@Override
  public Collection<String> getCacheNames() {
    Set<String> cacheNames = new HashSet<>();
    for (org.cache2k.Cache<?,?> cache : manager.getActiveCaches()) {
      cacheNames.add(cache.getName());
    }
    cacheNames.addAll(configuredCacheNames);
    return Collections.unmodifiableSet(cacheNames);
  }
228108
public List<String> getNames() {
        if (this.isEmpty()) {
            return Collections.emptyList();
        } else {
            final List<String> names = new ArrayList<>(this.size());
            for (final T i : this) {
                names.add(i.getName());
            }
            return names;
        }
    }
368494
protected List<String> getNameCache(Class cls, String pkgname) {
    return m_CacheNames.get(cls.getName() + "-" + pkgname);
  }
969978
private Set<String> getSearchIndexNames() {

        Set<String> names = new HashSet<String>();
        @SuppressWarnings("unchecked")
        Set<I_CmsSearchIndex> indexes = (Set<I_CmsSearchIndex>)getValue();
        for (I_CmsSearchIndex index : indexes) {
            names.add(index.getName());
        }
        return names;
    }
309358
public TemplateStats getStats(String fullTemplateName) {
        TemplateStats stats = (TemplateStats) mStatsMap.get(fullTemplateName);
        if (stats == null) {
            stats = new TemplateStats(fullTemplateName, mRawWindowSize, mAggregateWindowSize);
            mStatsMap.put(fullTemplateName, stats);
        }
        return stats;
    }
679828
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_SYSTEM_ADMIN)
    @Override
    public ResponseEntity<Collection<String>> invalidateCaches() {
        final Collection<String> cacheNames = cacheManager.getCacheNames();
        LOGGER.info("Invalidating caches {}", cacheNames);
        cacheNames.forEach(cacheName -> cacheManager.getCache(cacheName).clear());
        return ResponseEntity.ok(cacheNames);
    }
637665
@SuppressWarnings("PMD.AvoidCatchingNPE")
  private Map<K, V> getAll(Set<? extends K> keys, boolean updateAccessTime) {
    requireNotClosed();
    boolean statsEnabled = statistics.isEnabled();
    long start = statsEnabled ? ticker.read() : 0L;
    try {
      Map<K, Expirable<V>> entries = getAndFilterExpiredEntries(keys, updateAccessTime);

      if (entries.size() != keys.size()) {
        List<K> keysToLoad = keys.stream()
            .filter(key -> !entries.containsKey(key))
            .collect(Collectors.<K>toList());
        entries.putAll(cache.getAll(keysToLoad));
      }

      Map<K, V> result = copyMap(entries);
      if (statsEnabled) {
        statistics.recordGetTime(ticker.read() - start);
      }
      return result;
    } catch (NullPointerException | IllegalStateException | ClassCastException | CacheException e) {
      throw e;
    } catch (RuntimeException e) {
      throw new CacheException(e);
    } finally {
      dispatcher.awaitSynchronous();
    }
  }
415042
@Override
    public List getCacheIdsInPushPullTable() {
        final String methodName = "getCacheIdsInPushPullTable()";
        List list = new ArrayList();
        if (this.featureSupport.isReplicationSupported()) {
            // TODO write code to support getCacheIdsInPushPullTable function
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, methodName + " cacheName=" + cacheName + " ERROR because it is not implemented yet");
            }
        } else {
            Tr.error(tc, "DYNA1065E", new Object[] { methodName, cacheName, this.cacheProviderName });
        }
        return list;
    }
503963
public String[] getJ2EEStatisticNames() {
        ArrayList members = copyStatistics();
        if (members == null)
            return new String[0];

        String[] ret = new String[members.size()];
        for (int i = 0; i < ret.length; i++) {
            if (members.get(i) != null)
                ret[i] = ((StatisticImpl) members.get(i)).getName();
        }
        return ret;
    }
1014722
public java.util.List<CacheCluster> getCacheClusters() {
        if (cacheClusters == null) {
            cacheClusters = new com.amazonaws.internal.SdkInternalList<CacheCluster>();
        }
        return cacheClusters;
    }