Module org.eclipse.persistence.core
Class NoIdentityMap
java.lang.Object
org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap
org.eclipse.persistence.internal.identitymaps.NoIdentityMap
- All Implemented Interfaces:
Serializable,Cloneable,IdentityMap
Purpose: Provide the capability to not cache objects at all.
Responsibilities:
- Do nothing when an object is cached.
- Since:
- TOPLink/Java 1.0
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap
descriptor, isIsolated, maxSize, session -
Constructor Summary
ConstructorsConstructorDescriptionNoIdentityMap(int size, ClassDescriptor descriptor, AbstractSession session, boolean isolated) -
Method Summary
Modifier and TypeMethodDescriptionReturn an empty enumerator.voidcollectLocks(HashMap threadList) NoIdentityMap has no locks.elements()Return an empty enumerator.Return null as no objects are cached.getCacheKey(Object searchKey, boolean forMerge) Return null as no objects are cached.intgetSize()Return 0 as no objects are cached.intReturn 0 as no objects are cached.getWriteLockValue(Object primaryKey) Return null as no objects are cached.keys()Return an empty enumerator.keys(boolean checkReadLocks) Return an empty enumerator.voidlazyRelationshipLoaded(Object object, ValueHolderInterface valueHolder, ForeignReferenceMapping mapping) Notify the cache that a lazy relationship has been triggered in the object and the cache may need to be updatedDo Nothing.protected CacheKeyputCacheKeyIfAbsent(CacheKey cacheKey) Return null as no objects are cached.Do Nothing.Do Nothing.voidsetWriteLockValue(Object primaryKey, Object writeLockValue) Do Nothing.Methods inherited from class org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap
acquireDeferredLock, acquireLock, acquireLockNoWait, acquireLockWithWait, acquireReadLockOnCacheKey, acquireReadLockOnCacheKeyNoWait, clone, containsKey, createCacheKey, getAllCacheKeysFromIdentityMapWithEntityPK, getAllFromIdentityMapWithEntityPK, getCacheKeyForLock, getCacheKeyWithReadLock, getDefaultIdentityMapClass, getDescriptor, getDescriptorClass, getMaxSize, getWrapper, release, setDescriptor, setMaxSize, setWrapper, toString, updateMaxSize
-
Constructor Details
-
NoIdentityMap
public NoIdentityMap(int size, ClassDescriptor descriptor, AbstractSession session, boolean isolated)
-
-
Method Details
-
collectLocks
NoIdentityMap has no locks.- Specified by:
collectLocksin interfaceIdentityMap- Specified by:
collectLocksin classAbstractIdentityMap
-
elements
Return an empty enumerator.- Specified by:
elementsin interfaceIdentityMap- Specified by:
elementsin classAbstractIdentityMap
-
get
Return null as no objects are cached.- Specified by:
getin interfaceIdentityMap- Overrides:
getin classAbstractIdentityMap
-
getCacheKey
Return null as no objects are cached.- Specified by:
getCacheKeyin interfaceIdentityMap- Specified by:
getCacheKeyin classAbstractIdentityMap
-
putCacheKeyIfAbsent
Return null as no objects are cached.- Specified by:
putCacheKeyIfAbsentin classAbstractIdentityMap
-
getSize
public int getSize()Return 0 as no objects are cached.- Specified by:
getSizein interfaceIdentityMap- Specified by:
getSizein classAbstractIdentityMap
-
getSize
Return 0 as no objects are cached.- Specified by:
getSizein interfaceIdentityMap- Specified by:
getSizein classAbstractIdentityMap
-
getWriteLockValue
Return null as no objects are cached.- Specified by:
getWriteLockValuein interfaceIdentityMap- Overrides:
getWriteLockValuein classAbstractIdentityMap
-
keys
Return an empty enumerator.- Specified by:
keysin interfaceIdentityMap- Specified by:
keysin classAbstractIdentityMap
-
cloneKeys
Return an empty enumerator.- Returns:
- clone of the CacheKeys enumeration
-
keys
Return an empty enumerator.- Parameters:
checkReadLocks- - true if readLocks should be checked, false otherwise.
-
lazyRelationshipLoaded
public void lazyRelationshipLoaded(Object object, ValueHolderInterface valueHolder, ForeignReferenceMapping mapping) Notify the cache that a lazy relationship has been triggered in the object and the cache may need to be updated -
put
Do Nothing.- Specified by:
putin interfaceIdentityMap- Specified by:
putin classAbstractIdentityMap- Parameters:
primaryKey- is the primary key for the object.object- is the domain object to cache.writeLockValue- is the current write lock value of object, if null the version is ignored.
-
remove
Do Nothing. Return null, since no objects are cached.- Specified by:
removein interfaceIdentityMap- Overrides:
removein classAbstractIdentityMap
-
remove
Do Nothing. Return null, since no objects are cached.- Specified by:
removein interfaceIdentityMap- Specified by:
removein classAbstractIdentityMap
-
setWriteLockValue
Do Nothing.- Specified by:
setWriteLockValuein interfaceIdentityMap- Overrides:
setWriteLockValuein classAbstractIdentityMap
-