org.apache.manifoldcf.core.interfaces
Class CacheKeyFactory

java.lang.Object
  extended by org.apache.manifoldcf.core.interfaces.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
static java.lang.String _rcsid
           
 
Constructor Summary
protected CacheKeyFactory()
           
 
Method Summary
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
 

Field Detail

_rcsid

public static final java.lang.String _rcsid
See Also:
Constant Field Values
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.