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
ConstructorDescriptionNoIdentityMap
(int size, ClassDescriptor descriptor, AbstractSession session, boolean isolated) -
Method Summary
Modifier and TypeMethodDescriptionReturn an empty enumerator.void
collectLocks
(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.int
getSize()
Return 0 as no objects are cached.int
Return 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.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 updatedDo Nothing.protected CacheKey
putCacheKeyIfAbsent
(CacheKey cacheKey) Return null as no objects are cached.Do Nothing.Do Nothing.void
setWriteLockValue
(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:
collectLocks
in interfaceIdentityMap
- Specified by:
collectLocks
in classAbstractIdentityMap
-
elements
Return an empty enumerator.- Specified by:
elements
in interfaceIdentityMap
- Specified by:
elements
in classAbstractIdentityMap
-
get
Return null as no objects are cached.- Specified by:
get
in interfaceIdentityMap
- Overrides:
get
in classAbstractIdentityMap
-
getCacheKey
Return null as no objects are cached.- Specified by:
getCacheKey
in interfaceIdentityMap
- Specified by:
getCacheKey
in classAbstractIdentityMap
-
putCacheKeyIfAbsent
Return null as no objects are cached.- Specified by:
putCacheKeyIfAbsent
in classAbstractIdentityMap
-
getSize
public int getSize()Return 0 as no objects are cached.- Specified by:
getSize
in interfaceIdentityMap
- Specified by:
getSize
in classAbstractIdentityMap
-
getSize
Return 0 as no objects are cached.- Specified by:
getSize
in interfaceIdentityMap
- Specified by:
getSize
in classAbstractIdentityMap
-
getWriteLockValue
Return null as no objects are cached.- Specified by:
getWriteLockValue
in interfaceIdentityMap
- Overrides:
getWriteLockValue
in classAbstractIdentityMap
-
keys
Return an empty enumerator.- Specified by:
keys
in interfaceIdentityMap
- Specified by:
keys
in 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:
put
in interfaceIdentityMap
- Specified by:
put
in 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:
remove
in interfaceIdentityMap
- Overrides:
remove
in classAbstractIdentityMap
-
remove
Do Nothing. Return null, since no objects are cached.- Specified by:
remove
in interfaceIdentityMap
- Specified by:
remove
in classAbstractIdentityMap
-
setWriteLockValue
Do Nothing.- Specified by:
setWriteLockValue
in interfaceIdentityMap
- Overrides:
setWriteLockValue
in classAbstractIdentityMap
-