Interface MetaDataGenerator


public interface MetaDataGenerator
The MetaDataGenerator normally is responsible for assigning timeout, external cache group, and priority via the appropriate methods in the entry's FragmentInfo object.

One MetaDataGenerator will exist for each cacheable servlet identified in WebSphere. When implementing this interface, be aware that multiple threads may be using the same MetaDataGenerator concurrently.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated.
    Initialize is called once on servlet initialization, and should take configuration values from its CacheConfig argurment and store them locally.
    void
    setMetaData(ServletCacheRequest request, javax.servlet.http.HttpServletResponse response)
    The servlet engine calls this method each time a new cache entry is created.
  • Method Details

    • initialize

      void initialize(CacheConfig cc)
      Deprecated.
      Initialize is called once on servlet initialization, and should take configuration values from its CacheConfig argurment and store them locally. Additional config information from user applications or other sources may be read here as well.
    • setMetaData

      void setMetaData(ServletCacheRequest request, javax.servlet.http.HttpServletResponse response)
      The servlet engine calls this method each time a new cache entry is created. It sets that entry's timeout, and optionally its priority and any external cache groups it is a member of. To set these variables, the setMetaData method should call CacheProxyRequest.getFragmentInfo() to get the FragmentInfo object associated with the entry being built. Then use methods like FragmentInfo.setTimeLimit() to set timeout values according to your application's needs.
      Parameters:
      request - The request object being used for this invocation
      response - The response object being used for this invocation