|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.datacache.DataCacheManagerImpl
public class DataCacheManagerImpl
Default data cache manager provides handle to utilities PCDataGenerator, ClearableScheduler and CacheDistributionPolicy for the cache operation. This implementation also determines whether a managed type is eligible to cache.
Constructor Summary | |
---|---|
DataCacheManagerImpl()
|
Method Summary | |
---|---|
void |
close()
Close all caches. |
ClearableScheduler |
getClearableScheduler()
Return the runnable which schedules evictions. |
DataCache |
getDataCache(String name)
Return the named data cache, or null if it does not exist. |
DataCache |
getDataCache(String name,
boolean create)
Returns the named cache. |
CacheDistributionPolicy |
getDistributionPolicy()
Gets the instance-based cache distribution policy, if configured. |
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. |
boolean |
isCachable(ClassMetaData meta)
Affirms if the given type is eligible for cache. |
Map<String,Boolean> |
listKnownTypes()
Returns the names of classes that are known to the cache and whether or not they are currently being cached. |
DataCache |
selectCache(OpenJPAStateManager sm)
Select cache for the given managed instance. |
void |
setTypes(Set<String> includedTypes,
Set<String> excludedTypes)
|
void |
startCaching(String cls)
Start caching the type matching the provided class name. |
void |
stopCaching(String cls)
Stop caching the type matching the provided class name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataCacheManagerImpl()
Method Detail |
---|
public void initialize(OpenJPAConfiguration conf, ObjectValue dataCache, ObjectValue queryCache)
DataCacheManager
initialize
in interface DataCacheManager
public DataCache getSystemDataCache()
DataCacheManager
getSystemDataCache
in interface DataCacheManager
public DataCache getDataCache(String name)
DataCacheManager
getDataCache
in interface DataCacheManager
public DataCache getDataCache(String name, boolean create)
getDataCache
in interface DataCacheManager
create
- if true, the cache will be created if it does
not already existpublic QueryCache getSystemQueryCache()
DataCacheManager
getSystemQueryCache
in interface DataCacheManager
public DataCachePCDataGenerator getPCDataGenerator()
DataCacheManager
getPCDataGenerator
in interface DataCacheManager
public ClearableScheduler getClearableScheduler()
DataCacheManager
getClearableScheduler
in interface DataCacheManager
public void close()
DataCacheManager
close
in interface DataCacheManager
close
in interface Closeable
public DataCache selectCache(OpenJPAStateManager sm)
selectCache
in interface DataCacheManager
sm
- the managed proxy instance
public CacheDistributionPolicy getDistributionPolicy()
getDistributionPolicy
in interface DataCacheManager
public boolean isCachable(ClassMetaData meta)
public void setTypes(Set<String> includedTypes, Set<String> excludedTypes)
public void startCaching(String cls)
DataCacheManager
startCaching
in interface DataCacheManager
public void stopCaching(String cls)
DataCacheManager
stopCaching
in interface DataCacheManager
public Map<String,Boolean> listKnownTypes()
DataCacheManager
listKnownTypes
in interface DataCacheManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |