public class DataCacheManagerImpl extends Object implements Closeable, DataCacheManager
| Constructor and Description |
|---|
DataCacheManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public void initialize(OpenJPAConfiguration conf, ObjectValue dataCache, ObjectValue queryCache)
DataCacheManagerinitialize in interface DataCacheManagerpublic DataCache getSystemDataCache()
DataCacheManagergetSystemDataCache in interface DataCacheManagerpublic DataCache getDataCache(String name)
DataCacheManagergetDataCache in interface DataCacheManagerpublic DataCache getDataCache(String name, boolean create)
getDataCache in interface DataCacheManagercreate - if true, the cache will be created if it does
not already existpublic QueryCache getSystemQueryCache()
DataCacheManagergetSystemQueryCache in interface DataCacheManagerpublic DataCachePCDataGenerator getPCDataGenerator()
DataCacheManagergetPCDataGenerator in interface DataCacheManagerpublic ClearableScheduler getClearableScheduler()
DataCacheManagergetClearableScheduler in interface DataCacheManagerpublic void close()
DataCacheManagerclose in interface DataCacheManagerclose in interface Closeablepublic DataCache selectCache(OpenJPAStateManager sm)
selectCache in interface DataCacheManagersm - the managed proxy instancepublic CacheDistributionPolicy getDistributionPolicy()
getDistributionPolicy in interface DataCacheManagerpublic boolean isCachable(ClassMetaData meta)
public void startCaching(String cls)
DataCacheManagerstartCaching in interface DataCacheManagerpublic void stopCaching(String cls)
DataCacheManagerstopCaching in interface DataCacheManagerpublic Map<String,Boolean> listKnownTypes()
DataCacheManagerlistKnownTypes in interface DataCacheManagerCopyright © 2006–2022 Apache Software Foundation. All rights reserved.