org.apache.openjpa.datacache
Class DataCacheManagerImpl

java.lang.Object
  extended by org.apache.openjpa.datacache.DataCacheManagerImpl
All Implemented Interfaces:
DataCacheManager, Closeable

public class DataCacheManagerImpl
extends Object
implements Closeable, DataCacheManager

Default data cache manager.

Author:
Abe White, Patrick Linskey

Constructor Summary
DataCacheManagerImpl()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataCacheManagerImpl

public DataCacheManagerImpl()
Method Detail

initialize

public void initialize(OpenJPAConfiguration conf,
                       ObjectValue dataCache,
                       ObjectValue queryCache)
Description copied from interface: DataCacheManager
Initialize the manager, supplying the cache configuration.

Specified by:
initialize in interface DataCacheManager

getSystemDataCache

public DataCache getSystemDataCache()
Description copied from interface: DataCacheManager
Return the system-wide data cache, or null if caching is not enabled.

Specified by:
getSystemDataCache in interface DataCacheManager

getDataCache

public DataCache getDataCache(String name)
Description copied from interface: DataCacheManager
Return the named data cache, or null if it does not exist.

Specified by:
getDataCache in interface DataCacheManager

getDataCache

public DataCache getDataCache(String name,
                              boolean create)
Description copied from interface: DataCacheManager
Return the named data cache. If the given name is null, the default data cache is returned.

Specified by:
getDataCache in interface DataCacheManager
create - if true, the cache will be created if it does not already exist

getSystemQueryCache

public QueryCache getSystemQueryCache()
Description copied from interface: DataCacheManager
Return the system query cache, or null if not configured.

Specified by:
getSystemQueryCache in interface DataCacheManager

getPCDataGenerator

public DataCachePCDataGenerator getPCDataGenerator()
Description copied from interface: DataCacheManager
Return the PCData generator if configured.

Specified by:
getPCDataGenerator in interface DataCacheManager

getDataCacheScheduler

public DataCacheScheduler getDataCacheScheduler()
Description copied from interface: DataCacheManager
Return the runnable which schedules evictions.

Specified by:
getDataCacheScheduler in interface DataCacheManager

close

public void close()
Description copied from interface: DataCacheManager
Close all caches.

Specified by:
close in interface DataCacheManager
Specified by:
close in interface Closeable


Copyright © 2006 Apache Software Foundation. All Rights Reserved.