This implements the method in the CacheUnit interface.
This is called by DRSRemoteService and NullRemoteServices.

@param externalCacheFragment The external cache fragment to be relayed.
321955
public void setExternalCacheFragment(ExternalInvalidation externalCacheFragment) {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "setExternalCacheFragment: {0}", externalCacheFragment.getUri());
        externalCacheFragment = invalidationAuditDaemon.filterExternalCacheFragment(ServerCache.cache.getCacheName(), externalCacheFragment);
        if (externalCacheFragment != null) {
            batchUpdateDaemon.pushExternalCacheFragment(externalCacheFragment, ServerCache.cache);  
        }
        if (tc.isEntryEnabled())
            Tr.exit(tc, "setExternalCacheFragment: {0}", externalCacheFragment.getUri());
    }
522089
@Override
	public void cacheResult(List<CPAttachmentFileEntry> cpAttachmentFileEntries) {
		for (CPAttachmentFileEntry cpAttachmentFileEntry : cpAttachmentFileEntries) {
			if (entityCache.getResult(
						CPAttachmentFileEntryModelImpl.ENTITY_CACHE_ENABLED,
						CPAttachmentFileEntryImpl.class,
						cpAttachmentFileEntry.getPrimaryKey()) == null) {
				cacheResult(cpAttachmentFileEntry);
			}
			else {
				cpAttachmentFileEntry.resetOriginalValues();
			}
		}
	}
118146
public void storeInCache(@Nullable String rawPath) {
        if (CACHE != null && rawPath != null) {
            CACHE.put(rawPath, this);
        }
    }
1260237
@Override
	public void clearCache(CommerceUserSegmentEntry commerceUserSegmentEntry) {
		entityCache.removeResult(CommerceUserSegmentEntryModelImpl.ENTITY_CACHE_ENABLED,
			CommerceUserSegmentEntryImpl.class,
			commerceUserSegmentEntry.getPrimaryKey());

		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);

		clearUniqueFindersCache((CommerceUserSegmentEntryModelImpl)commerceUserSegmentEntry,
			true);
	}
264062
@Override
    public void setJMSRedelivered(boolean arg0) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setJMSRedelivered", arg0);

        if (arg0 == false) {
            // This is well defined.
            msg.setRedeliveredCount(0);
        }
        else {
            // This is quite arbitrary, however the user application only calls
            // this if the want to alter the value after the message has been received,
            // in which case they get what they deserve.
            msg.setRedeliveredCount(1);
        }

        // Invalidate the toString cache
        cachedToString = null;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setJMSRedelivered");
    }
182466
private static CacheProvider getCacheProvider(Method javaMethod) {
        if (!javaMethod.isAnnotationPresent(Cache.class)) {
            return null;
        }

        Cache an = javaMethod.getAnnotation(Cache.class);
        Class<? extends CacheProvider> cacheClazz = an.value();

        try {
            Constructor<? extends CacheProvider> constructor = cacheClazz.getDeclaredConstructor();
            constructor.setAccessible(true);
            return constructor.newInstance();
        } catch (Exception e) {
            throw new EventsException("Cannot instantiate cache provider "
                    + cacheClazz.getSimpleName() + " for method "
                    + Utils.methodToString(javaMethod), e);
        }
    }
985788
public void setEscapedFragment(String escapedFragment) throws URIException {
        if (escapedFragment == null) {
            _fragment = null;
            hash = 0;
            return;
        }
        setRawFragment(escapedFragment.toCharArray());
    }
386957
@Override
   public void cacheStarting(ComponentRegistry cr, Configuration cfg, String cacheName) {
      InternalCacheRegistry icr = cr.getGlobalComponentRegistry().getComponent(InternalCacheRegistry.class);
      if (!icr.isInternalCache(cacheName) || icr.internalCacheHasFlag(cacheName, Flag.QUERYABLE)) {
         AdvancedCache<?, ?> cache = cr.getComponent(Cache.class).getAdvancedCache();
         ClassLoader aggregatedClassLoader = makeAggregatedClassLoader(cr.getGlobalComponentRegistry().getGlobalConfiguration().classLoader());
         SearchIntegrator searchFactory = null;
         boolean isIndexed = cfg.indexing().index().isEnabled();
         if (isIndexed) {
            setBooleanQueryMaxClauseCount();

            cr.registerComponent(new ShardAllocationManagerImpl(), ShardAllocatorManager.class);
            searchFactory = createSearchIntegrator(cfg.indexing(), cr, aggregatedClassLoader);

            KeyTransformationHandler keyTransformationHandler = new KeyTransformationHandler(aggregatedClassLoader);
            cr.registerComponent(keyTransformationHandler, KeyTransformationHandler.class);

            createQueryInterceptorIfNeeded(cr.getComponent(BasicComponentRegistry.class), cfg, cache, searchFactory, keyTransformationHandler);
            addCacheDependencyIfNeeded(cacheName, cache.getCacheManager(), cfg.indexing());

            cr.registerComponent(new QueryBox(), QueryBox.class);
         }

         registerMatcher(cr, searchFactory, aggregatedClassLoader);

         cr.registerComponent(new EmbeddedQueryEngine(cache, isIndexed), EmbeddedQueryEngine.class);
      }
   }
763808
@Override
	public void cacheResult(
		List<CommerceDiscountUserSegmentRel> commerceDiscountUserSegmentRels) {
		for (CommerceDiscountUserSegmentRel commerceDiscountUserSegmentRel : commerceDiscountUserSegmentRels) {
			if (entityCache.getResult(
						CommerceDiscountUserSegmentRelModelImpl.ENTITY_CACHE_ENABLED,
						CommerceDiscountUserSegmentRelImpl.class,
						commerceDiscountUserSegmentRel.getPrimaryKey()) == null) {
				cacheResult(commerceDiscountUserSegmentRel);
			}
			else {
				commerceDiscountUserSegmentRel.resetOriginalValues();
			}
		}
	}
761830
public ExternalInvalidation filterExternalCacheFragment(String cacheName, ExternalInvalidation externalCacheFragment) {
		InvalidationTableList invalidationTableList = getInvalidationTableList(cacheName);
		try {
			invalidationTableList.readWriteLock.readLock().lock();
			return internalFilterExternalCacheFragment(cacheName, invalidationTableList, externalCacheFragment);
		} finally {
			invalidationTableList.readWriteLock.readLock().unlock();
		}
	}
1331910
public ArrayList filterExternalCacheFragmentList(String cacheName, ArrayList incomingList) {
		InvalidationTableList invalidationTableList = getInvalidationTableList(cacheName);
		try {
			invalidationTableList.readWriteLock.readLock().lock();
			Iterator it = incomingList.iterator();
			while (it.hasNext()) {
				ExternalInvalidation externalCacheFragment = (ExternalInvalidation) it.next();

				if (null == internalFilterExternalCacheFragment(cacheName, invalidationTableList, externalCacheFragment)) {
					if (tc.isDebugEnabled()) {
						Tr.debug(tc, "filterExternalCacheFragmentList(): Filtered OUT cacheName=" + cacheName + " uri=" + externalCacheFragment.getUri());
					}
					it.remove();
				}
			}
			return incomingList;

		} finally {
			invalidationTableList.readWriteLock.readLock().unlock();
		}
	}
1273882
@Override
	public void cacheResult(
		List<CommerceNotificationTemplateUserSegmentRel> commerceNotificationTemplateUserSegmentRels) {
		for (CommerceNotificationTemplateUserSegmentRel commerceNotificationTemplateUserSegmentRel : commerceNotificationTemplateUserSegmentRels) {
			if (entityCache.getResult(
						CommerceNotificationTemplateUserSegmentRelModelImpl.ENTITY_CACHE_ENABLED,
						CommerceNotificationTemplateUserSegmentRelImpl.class,
						commerceNotificationTemplateUserSegmentRel.getPrimaryKey()) == null) {
				cacheResult(commerceNotificationTemplateUserSegmentRel);
			}
			else {
				commerceNotificationTemplateUserSegmentRel.resetOriginalValues();
			}
		}
	}
218778
public void setFragment( String fragment )
    {
        _fragment = null;
        if ( fragment != null && fragment.length() > 0 )
        {
            _fragment = fragment;
        }
    }
185640
@Override
	public void cacheResult(
		List<CommerceNotificationTemplate> commerceNotificationTemplates) {
		for (CommerceNotificationTemplate commerceNotificationTemplate : commerceNotificationTemplates) {
			if (entityCache.getResult(
						CommerceNotificationTemplateModelImpl.ENTITY_CACHE_ENABLED,
						CommerceNotificationTemplateImpl.class,
						commerceNotificationTemplate.getPrimaryKey()) == null) {
				cacheResult(commerceNotificationTemplate);
			}
			else {
				commerceNotificationTemplate.resetOriginalValues();
			}
		}
	}
328551
@Override
   public void setCacheManager(EmbeddedCacheManager cm) {
      String name = cacheName.toString();
      if (cm.cacheExists(name)) {
         Cache cache = cm.getCache(name);
         searchFactory = ComponentRegistryUtils.getSearchIntegrator(cache);
         queryInterceptor = ComponentRegistryUtils.getQueryInterceptor(cache);
      } else {
         throw new CacheException("Cache named '" + name + "' does not exist on this CacheManager, or was not started");
      }
   }
175647
public static <T> T queryTryCache(Class<? extends BaseEntity> entityClass,String key,long expireSeconds,Callable<T> dataCaller){
		
		if(CacheHandler.cacheProvider == null){
			try {
				return dataCaller.call();
			} catch (Exception e) {
				throw new RuntimeException(e);
			}
		}
		
		String entityClassName = entityClass.getSimpleName();
		key = entityClassName + CacheHandler.SPLIT_PONIT + key;
		T result = CacheHandler.cacheProvider.get(key);
		if(result == null){
			try {				
				result = dataCaller.call();
				if(result != null){
					CacheHandler.cacheProvider.set(key, result, expireSeconds);
					String cacheGroupKey = entityClassName + CacheHandler.GROUPKEY_SUFFIX;
					CacheHandler.cacheProvider.putGroup(cacheGroupKey, key, expireSeconds);
				}
			} catch (Exception e) {
				throw new RuntimeException(e);
			}
		}
		return result;
	}
1139503
@Override
	public void cache(final Object key, final Object object) {
		this.logger.debug("@cache ");

		if (object == null) {
			if (!isAllowNullable()) {
				return;
			}
			this.logger.debug("logging key :", key, " with null");
			getCachableMap(JKAbstractCacheManager.NULLABLE_MAP_CLASS).put(key, null);
		} else {
			cache(key, object, object.getClass());
		}
	}