コード例 #1
0
 private void clearConfigCache() {
   Cache workflowCache =
       Caching.getCacheManager(APIConstants.API_MANAGER_CACHE_MANAGER)
           .getCache(APIConstants.WORKFLOW_CACHE_NAME);
   String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
   String cacheName = tenantDomain + "_" + APIConstants.WORKFLOW_CACHE_NAME;
   if (workflowCache.containsKey(cacheName)) {
     workflowCache.remove(cacheName);
   }
 }
コード例 #2
0
  protected List<ValueEval> fetchValuesWithOptimisations(
      DsLookupParameters parameters, OperationEvaluationContext ec) {
    DataSetOptimisationsCache caches =
        (DataSetOptimisationsCache)
            ec.getCustomEvaluationContext().get(DataSetOptimisationsCache.class);
    if (caches == null) {
      caches = this.external.getDataSetOptimisationsCache();
    }

    Cache<DsLookupParameters, List> cache = caches.getDataSetToDsLookupParameters();

    if (cache.containsKey(parameters)) {
      return cache.get(parameters);
    }

    return null;
  }
コード例 #3
0
 public boolean containsKey(Object arg0) {
   if (localCache.containsKey(arg0)) {
     return true;
   }
   return cache.containsKey(arg0);
 }
コード例 #4
0
 @Override
 public boolean containsKey(Object key) {
   return map.containsKey(key) || cache.containsKey(key);
 }