Class CacheKeyFactory

  • Direct Known Subclasses:
    CacheKeyFactory, CacheKeyFactory

    public class CacheKeyFactory
    extends java.lang.Object
    This class just represents a central place where cache keys are assembled. All methods are static.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String _rcsid  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected CacheKeyFactory()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String makeDatabaseKey​(java.lang.String databaseName)
      Construct a general database cache key.
      static java.lang.String makeDatabaseKey​(java.lang.String keyName, java.lang.String databaseName)
      Construct a key that is database specific.
      static java.lang.String makeTableKey​(java.lang.String keyName, java.lang.String tableName, java.lang.String databaseName)
      Construct a key that is database specific, and applies to queries made against a specific table name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CacheKeyFactory

        protected CacheKeyFactory()
    • Method Detail

      • makeDatabaseKey

        public static java.lang.String makeDatabaseKey​(java.lang.String keyName,
                                                       java.lang.String databaseName)
        Construct a key that is database specific. Typically, this method is not called directly; it gets invoked by other key construction methods. Overall, it will be called last in a compositional sequence that looks conceptually like this: makeDatabaseKey(makeTableKey(makeThingsTableTypeKey(typeX),"Things"),databaseName);
        Parameters:
        keyName - is the input keyname
        databaseName - is the database name
        Returns:
        the qualified key name
      • makeTableKey

        public static java.lang.String makeTableKey​(java.lang.String keyName,
                                                    java.lang.String tableName,
                                                    java.lang.String databaseName)
        Construct a key that is database specific, and applies to queries made against a specific table name.
      • makeDatabaseKey

        public static java.lang.String makeDatabaseKey​(java.lang.String databaseName)
        Construct a general database cache key.
        Parameters:
        databaseName - is the database name.
        Returns:
        the cache key.