org.apache.openjpa.datacache
Interface DataCacheManager

All Known Implementing Classes:
DataCacheManagerImpl

public interface DataCacheManager

Manages the system's data and query caches. You can retrieve the data cache manager from the OpenJPAConfiguration.

Author:
Abe White, Patrick Linskey

Method Summary
 void close()
          Close all caches.
 DataCache getDataCache(String name)
          Return the named data cache, or null if it does not exist.
 DataCache getDataCache(String name, boolean create)
          Return the named data cache.
 DataCacheScheduler getDataCacheScheduler()
          Return the runnable which schedules evictions.
 DataCachePCDataGenerator getPCDataGenerator()
          Return the PCData generator if configured.
 DataCache getSystemDataCache()
          Return the system-wide data cache, or null if caching is not enabled.
 QueryCache getSystemQueryCache()
          Return the system query cache, or null if not configured.
 void initialize(OpenJPAConfiguration conf, ObjectValue dataCache, ObjectValue queryCache)
          Initialize the manager, supplying the cache configuration.
 

Method Detail

initialize

void initialize(OpenJPAConfiguration conf,
                ObjectValue dataCache,
                ObjectValue queryCache)
Initialize the manager, supplying the cache configuration.


getSystemDataCache

DataCache getSystemDataCache()
Return the system-wide data cache, or null if caching is not enabled.


getDataCache

DataCache getDataCache(String name)
Return the named data cache, or null if it does not exist.


getDataCache

DataCache getDataCache(String name,
                       boolean create)
Return the named data cache. If the given name is null, the default data cache is returned.

Parameters:
create - if true, the cache will be created if it does not already exist

getSystemQueryCache

QueryCache getSystemQueryCache()
Return the system query cache, or null if not configured.


getPCDataGenerator

DataCachePCDataGenerator getPCDataGenerator()
Return the PCData generator if configured.


getDataCacheScheduler

DataCacheScheduler getDataCacheScheduler()
Return the runnable which schedules evictions.


close

void close()
Close all caches.



Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.