public class VersionConsistencyCacheImpl extends Object implements VersionConsistencyCache
| Modifier | Constructor and Description |
|---|---|
protected |
VersionConsistencyCacheImpl(boolean highPerf)
Creates a cache with desired performance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPCType(Class pcType)
This implementation does nothing.
|
StateManager |
get(Class pcType,
Object oid)
Returns an SM, if found, else null.
|
boolean |
isHighPerf() |
StateManager |
put(Class pcType,
Object oid,
StateManager sm)
Puts the given StateManager into a map that is keyed by the given OID.
|
StateManager |
remove(Class pcType,
Object oid)
Removes entry based on pc and oid.
|
void |
removePCType(Class pcType)
Removes the map for the given pcType and all its elements.
|
int |
size() |
protected VersionConsistencyCacheImpl(boolean highPerf)
highPerf - If true, use LruCache, else use BucketizedHashtable.public StateManager put(Class pcType, Object oid, StateManager sm)
VersionConsistencyCacheput in interface VersionConsistencyCachepcType - class of instance, used as key in outer map.oid - Object id, used as key in inner map.sm - StateManager bound to oid in inner map.VersionConsistencyCache.put(java.lang.Class, java.lang.Object, com.sun.jdo.spi.persistence.support.sqlstore.StateManager)public StateManager get(Class pcType, Object oid)
VersionConsistencyCacheget in interface VersionConsistencyCachepcType - class of instance, used as key in outer map.oid - Object id, used as key in inner map.VersionConsistencyCache.get(java.lang.Class, java.lang.Object)public StateManager remove(Class pcType, Object oid)
VersionConsistencyCacheremove in interface VersionConsistencyCachepcType - class of instance, used as key in outer map.oid - Object id, used as key in inner map.VersionConsistencyCache.remove(java.lang.Class, java.lang.Object)public void addPCType(Class pcType)
put(java.lang.Class, java.lang.Object, com.sun.jdo.spi.persistence.support.sqlstore.StateManager)addPCType in interface VersionConsistencyCachepcType - class of instance, used as key in outer map.public void removePCType(Class pcType)
VersionConsistencyCacheremovePCType in interface VersionConsistencyCachepcType - class of instance, used as key in outer map.VersionConsistencyCache.removePCType(java.lang.Class)public int size()
public boolean isHighPerf()
Copyright © 2019. All rights reserved.