public class PartitionedDataCache extends ConcurrentDataCache
<property name='openjpa.DataCache"
value="partitioned(name=X, PartitionType=concurrent,Partitions='(name=a,cacheSize=100),
(name=b,cacheSize=200)')
X with two partitions named
a and b with cache size 100 and 200 respectively.
Besides the two partitions, this cache instance itself can store data and referred by its own name
(X in the above example).
_lru_evictOnBulkUpdate, _excludedTypes, _includedTypes, _stats, conf, log_listenersNAME_DEFAULT| Constructor and Description |
|---|
PartitionedDataCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
endConfiguration()
Invoked upon completion of bean property configuration for this object.
|
DataCache |
getPartition(String name,
boolean create)
Gets the named partition.
|
Set<String> |
getPartitionNames()
Gets the name of the configured partitions.
|
List<String> |
getPartitions()
Returns the individual partition configuration properties.
|
void |
initialize(DataCacheManager mgr)
Initialize any resources associated with the given
DataCacheManager. |
boolean |
isPartitioned()
Always returns true.
|
void |
setPartitions(String parts)
Set partitions from a String configuration.
|
void |
setPartitionType(String type)
Sets the type of the partitions.
|
clearInternal, getCacheMap, getCacheSize, getInternal, getLru, getSoftReferenceSize, newCacheMap, pinInternal, putInternal, recacheUpdates, removeAllInternal, removeInternal, setCacheSize, setLru, setSoftReferenceSize, unpinAll, unpinInternal, writeLock, writeUnlockaddExpirationListener, afterCommit, clear, close, close, commit, contains, containsAll, fireEvent, get, getAll, getEnableStatistics, getEvictionSchedule, getEvictOnBulkUpdate, getExcludedTypes, getName, getStatistics, getTypes, isClosed, keyRemoved, pin, pinAll, pinAll, put, putAllInternal, remove, removeAll, removeAll, removeAllInternal, removeAllTypeNamesInternal, removeExpirationListener, selectCache, setConfiguration, setEnableStatistics, setEvictionSchedule, setEvictOnBulkUpdate, setExcludedTypes, setExcludedTypes, setName, setTypes, setTypes, startConfiguration, toString, unpin, unpinAll, updateaddListener, fireEvent, getListeners, hasListener, hasListeners, isFailFast, newListenerCollection, removeListener, setFailFastclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitafterCommit, closepublic void initialize(DataCacheManager mgr)
DataCacheDataCacheManager.initialize in interface DataCacheinitialize in class ConcurrentDataCachepublic void setPartitionType(String type) throws Exception
public void setPartitions(String parts)
parts - a String of the form (p1, p2, p3) where p1, p2 etc. itself are plug-in strings
for individual Data Cache configuration.public List<String> getPartitions()
public DataCache getPartition(String name, boolean create)
DataCachegetPartition in interface DataCachegetPartition in class AbstractDataCachename - name of the given partition.create - if true optionally create a new partition.public Set<String> getPartitionNames()
getPartitionNames in interface DataCachegetPartitionNames in class AbstractDataCachepublic final boolean isPartitioned()
isPartitioned in interface DataCacheisPartitioned in class AbstractDataCachepublic void endConfiguration()
ConfigurableendConfiguration in interface ConfigurableendConfiguration in class AbstractDataCacheCopyright © 2006–2022 Apache Software Foundation. All rights reserved.