com.ibm.commerce.context.content.resources.dynacache

Class DynaCacheUtility

  • java.lang.Object
    • com.ibm.commerce.context.content.resources.dynacache.DynaCacheUtility


  • public class DynaCacheUtility
    extends java.lang.Object
    DynaCacheUtility is a utility class for generating WebSphere Dynamic Cache invalidation IDs. It loads all the cache invalidation ID generators registered in the cache invalidation configuration file, and invokes them to generate invalidation IDs.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.List generateInvalidationIDs(java.lang.String resource, java.lang.String[] resourceKeys, java.util.HashMap oneRecord, java.lang.String action, java.sql.Connection connection, java.lang.String schema)
      invokes all the registered CacheInvalidationIDGenerator instances to generate WebSphere Dynamic Cache invalidation IDs.
      void initialize(java.net.URL configURL)
      initializes the instance by reading the cache invalidation configuration.
      boolean isInvalidationTrigger(java.lang.String resource, java.lang.String action)
      returns whether performing the action against the resource would trigger cache invalidation.
      static DynaCacheUtility singleton()
      returns the singleton of the DynaCacheUtility.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • singleton

        public static DynaCacheUtility singleton()
        returns the singleton of the DynaCacheUtility.
        Returns:
        the instance of the DynaCacheUtility.
      • initialize

        public void initialize(java.net.URL configURL)
                        throws ECException
        initializes the instance by reading the cache invalidation configuration.
        Parameters:
        configURL - the URL of the cache invalidation configuration.
        Throws:
        ECException - a problem occurs when initializing the instance.
      • generateInvalidationIDs

        public java.util.List generateInvalidationIDs(java.lang.String resource,
                                                      java.lang.String[] resourceKeys,
                                                      java.util.HashMap oneRecord,
                                                      java.lang.String action,
                                                      java.sql.Connection connection,
                                                      java.lang.String schema)
        invokes all the registered CacheInvalidationIDGenerator instances to generate WebSphere Dynamic Cache invalidation IDs.
        Parameters:
        resource - the resource.
        resourceKeys - the resource keys.
        oneRecord - a HashMap object contains the values in the resource object.
        action - the action performed against the resource object.
        connection - the database connection.
        schema - the database schema name.
        Returns:
        a list of cache invalidation IDs.
      • isInvalidationTrigger

        public boolean isInvalidationTrigger(java.lang.String resource,
                                             java.lang.String action)
        returns whether performing the action against the resource would trigger cache invalidation.
        Parameters:
        resource - the resource.
        action - the action performed against the resource object.
        Returns:
        true if performing the action against the resource would trigger cache invalidation.