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

Class KeyCombinationCacheInvalidationIDGeneratorImpl

  • java.lang.Object
    • com.ibm.commerce.context.content.resources.dynacache.KeyCombinationCacheInvalidationIDGeneratorImpl
  • All Implemented Interfaces:
    CacheInvalidationIDGenerator


    public class KeyCombinationCacheInvalidationIDGeneratorImpl
    extends java.lang.Object
    implements CacheInvalidationIDGenerator
    KeyCombinationCacheInvalidationIDGeneratorImpl implements the CacheInvalidationIDGenerator interface. It uses all possible combinations of resource keys to produce cache invalidation ID patterns, and then uses PatternBasedCacheInvalidationIDGeneratorImpl to generate cache invalidation IDs.
    • Constructor Detail

      • KeyCombinationCacheInvalidationIDGeneratorImpl

        public KeyCombinationCacheInvalidationIDGeneratorImpl()
        the default constructor.
    • Method Detail

      • 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)
        generates WebSphere Dynamic Cache invalidation IDs.
        Specified by:
        generateInvalidationIDs in interface CacheInvalidationIDGenerator
        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.
        Specified by:
        isInvalidationTrigger in interface CacheInvalidationIDGenerator
        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.