Tabnine Logo
EHCacheProvider.addDependency
Code IndexAdd Tabnine to your IDE (free)

How to use
addDependency
method
in
org.dd4t.caching.providers.EHCacheProvider

Best Java code snippets using org.dd4t.caching.providers.EHCacheProvider.addDependency (Showing top 2 results out of 315)

origin: org.dd4t/dd4t-caching

@Override
public <T> void storeInItemCache(String key, CacheElement<T> cacheElement, List<CacheDependency> dependencies) {
  if (!isEnabled()) {
    return;
  }
  if (!cacheExists()) {
    LOG.error("Cache configuration is invalid! NOT Caching. Check EH Cache configuration.");
    return;
  }
  // detect undeclared nulls, complain, and set to null
  if (!cacheElement.isNull() && cacheElement.getPayload() == null) {
    Exception exToLogToHaveStacktraceWhoCausedIt = new Exception();
    LOG.error("Detected undeclared null payload on element with key " + key + " at insert time!",
        exToLogToHaveStacktraceWhoCausedIt);
    cacheElement.setNull(true);
  }
  cacheElement.setExpired(false);
  Element element = cache.get(key);
  if (element == null) {
    element = new Element(key, cacheElement);
  }
  cache.put(element);
  element.setTimeToLive(cacheDependencyTTL);
  for (CacheDependency dep : dependencies) {
    String dependentKey = getKey(dep.getPublicationId(), dep.getItemId());
    cacheElement.setDependentKey(dependentKey);
    addDependency(key, dependentKey);
    updateTTL(dependencyCache.get(dependentKey));
  }
}
origin: org.dd4t/dd4t-caching

addDependency(key, dependencyKey);
org.dd4t.caching.providersEHCacheProvideraddDependency

Popular methods of EHCacheProvider

  • cacheExists
  • doCheckForPreview
  • expireElement
  • getKey
  • isEnabled
  • setExpired
  • setNotExpired
  • updateTTL

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • setRequestProperty (URLConnection)
  • startActivity (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now