com.joanju.cg.db
Class CacheManager

java.lang.Object
  extended by com.joanju.cg.db.CacheManager

public class CacheManager
extends java.lang.Object

Provides static cache managers for the db package and publicly for the rest of Callgraph. All caches provided by this class are thread safe.


Constructor Summary
CacheManager()
           
 
Method Summary
static void clearAllCaches()
          If a clear database is done, then all caches should be cleared.
static void clearForNewBuild()
          Clear the caches that should be cleared at the start of a new build.
static int searchPathForExternalCUID(int callnameID)
          Cached lookup of callnameID to external cuid.
static void sigMatchAdd(long pair)
           
static boolean sigMatchLookup(long pair)
           
static void sigMismatchAdd(long pair)
           
static boolean sigMismatchLookup(long pair)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheManager

public CacheManager()
Method Detail

clearAllCaches

public static void clearAllCaches()
If a clear database is done, then all caches should be cleared.


clearForNewBuild

public static void clearForNewBuild()
Clear the caches that should be cleared at the start of a new build. We have to assume that files and directories might have been moved since the last build, or the propath might have changed, etc.


sigMatchAdd

public static void sigMatchAdd(long pair)

sigMatchLookup

public static boolean sigMatchLookup(long pair)

sigMismatchAdd

public static void sigMismatchAdd(long pair)

sigMismatchLookup

public static boolean sigMismatchLookup(long pair)

searchPathForExternalCUID

public static int searchPathForExternalCUID(int callnameID)
                                     throws java.sql.SQLException,
                                            java.io.IOException
Cached lookup of callnameID to external cuid. Returns zero if the callnameID is zero or if the callname is zero length. Returns Layout.UNRESOLVED_VALUE if callnameID is UNRESOLVED_VALUE, or if not found on the propath.

Throws:
java.sql.SQLException
java.io.IOException


Copyright © 2008 Joanju Software. All Rights Reserved.