Search in sources :

Example 6 with CacheFactory

use of org.apache.derby.iapi.services.cache.CacheFactory in project derby by apache.

the class RAMAccessManager method conglomCacheInit.

/**
 ************************************************************************
 * Conglomerate Cache routines:
 **************************************************************************
 */
/**
 * ACCESSMANAGER CONGLOMERATE CACHE -
 * <p>
 * Every conglomerate in the system is described by an object which
 * implements Conglomerate.  This object basically contains the parameters
 * which describe the metadata about the conglomerate that store needs
 * to know - like types of columns, number of keys, number of columns, ...
 * <p>
 * It is up to each conglomerate to maintain it's own description, and
 * it's factory must be able to read this info from disk and return it
 * from the ConglomerateFactory.readConglomerate() interface.
 * <p>
 * This cache simply maintains an in memory copy of these conglomerate
 * objects, key'd by conglomerate id.  By caching, this avoids the cost
 * of reading the conglomerate info from disk on each subsequent query
 * which accesses the conglomerate.
 * <p>
 * The interfaces and internal routines which deal with this cache are:
 * conglomCacheInit() - initializes the cache at boot time.
 */
/**
 * Initialize the conglomerate cache.
 * <p>
 * Simply calls the cache manager to create the cache with some hard
 * coded defaults for size.
 * <p>
 * @exception  StandardException  Standard exception policy.
 */
private void conglomCacheInit() throws StandardException {
    // Get a cache factory to create the conglomerate cache.
    CacheFactory cf = (CacheFactory) startSystemModule(org.apache.derby.shared.common.reference.Module.CacheFactory);
    // Now create the conglomerate cache.
    conglom_cache = cf.newCacheManager(this, AccessFactoryGlobals.CFG_CONGLOMDIR_CACHE, 200, 300);
}
Also used : CacheFactory(org.apache.derby.iapi.services.cache.CacheFactory)

Aggregations

CacheFactory (org.apache.derby.iapi.services.cache.CacheFactory)6 IOException (java.io.IOException)1 PrivilegedActionException (java.security.PrivilegedActionException)1 Date (java.util.Date)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 UUID (org.apache.derby.catalog.UUID)1 ContextManager (org.apache.derby.iapi.services.context.ContextManager)1 ContextService (org.apache.derby.iapi.services.context.ContextService)1 ClassFactory (org.apache.derby.iapi.services.loader.ClassFactory)1 ShExLockable (org.apache.derby.iapi.services.locks.ShExLockable)1 PersistentService (org.apache.derby.iapi.services.monitor.PersistentService)1 UUIDFactory (org.apache.derby.iapi.services.uuid.UUIDFactory)1 LanguageConnectionContext (org.apache.derby.iapi.sql.conn.LanguageConnectionContext)1 LanguageConnectionFactory (org.apache.derby.iapi.sql.conn.LanguageConnectionFactory)1 DataDescriptorGenerator (org.apache.derby.iapi.sql.dictionary.DataDescriptorGenerator)1 SPSDescriptor (org.apache.derby.iapi.sql.dictionary.SPSDescriptor)1 TransactionController (org.apache.derby.iapi.store.access.TransactionController)1 DataFactory (org.apache.derby.iapi.store.raw.data.DataFactory)1 LogInstant (org.apache.derby.iapi.store.raw.log.LogInstant)1