Top Description Fields Constructors Methods
org.eclipse.persistence.internal.identitymaps

public Class NoIdentityMap

extends AbstractIdentityMap
Class Inheritance
Imports
java.util.*, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.indirection.ValueHolderInterface, org.eclipse.persistence.internal.sessions.AbstractSession, org.eclipse.persistence.mappings.ForeignReferenceMapping

Purpose: Provide the capability to not cache objects at all.

Responsibilities:

Since
TOPLink/Java 1.0

Field Summary

Inherited from org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap:
descriptorisIsolatedmaxSizesession

Constructor Summary

AccessConstructor and Description
public
NoIdentityMap(int size, ClassDescriptor descriptor, AbstractSession session, boolean isolated)

Method Summary

Modifier and TypeMethod and Description
public Enumeration<CacheKey>
public void
public Enumeration<E>
public Object
public CacheKey
public int
public int
getSize(Class<?> myClass, boolean recurse)

Implements abstract org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.getSize.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.getSize.

Return 0 as no objects are cached.
public Object
public Enumeration<CacheKey>
public Enumeration<CacheKey>
keys(boolean
- true if readLocks should be checked, false otherwise.
checkReadLocks
)

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.keys.

Return an empty enumerator.
public void
lazyRelationshipLoaded(Object object, ValueHolderInterface<T> valueHolder, ForeignReferenceMapping mapping)

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.lazyRelationshipLoaded.

Notify the cache that a lazy relationship has been triggered in the object and the cache may need to be updated
public CacheKey
put(Object
is the primary key for the object.
primaryKey
,
Object
is the domain object to cache.
object
,
Object
is the current write lock value of object, if null the version is ignored.
writeLockValue
,
long readTime)

Implements abstract org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.put.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.put.

Do Nothing.
protected CacheKey
public Object
public Object
public void
Inherited from org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap:
acquireDeferredLockacquireLockacquireLockNoWaitacquireLockWithWaitacquireReadLockOnCacheKeyacquireReadLockOnCacheKeyNoWaitclonecontainsKeycreateCacheKeygetAllCacheKeysFromIdentityMapWithEntityPKgetAllFromIdentityMapWithEntityPKgetCacheKeyForLockgetCacheKeyWithReadLockgetDefaultIdentityMapClassgetDescriptorgetDescriptorClassgetMaxSizegetWrapperreleasesetDescriptorsetMaxSizesetWrappertoStringupdateMaxSize

Constructor Detail

NoIdentityMapback to summary
public NoIdentityMap(int size, ClassDescriptor descriptor, AbstractSession session, boolean isolated)

Method Detail

cloneKeysback to summary
public Enumeration<CacheKey> cloneKeys()

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.cloneKeys.

Return an empty enumerator.

Returns:Enumeration<CacheKey>

Doc from org.eclipse.persistence.internal.identitymaps.IdentityMap.cloneKeys.

clone of the CacheKeys enumeration

Annotations
@Override
collectLocksback to summary
public void collectLocks(HashMap<K, V> threadList)

Implements abstract org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.collectLocks.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.collectLocks.

NoIdentityMap has no locks.

Annotations
@Override
elementsback to summary
public Enumeration<E> elements()

Implements abstract org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.elements.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.elements.

Return an empty enumerator.

Annotations
@Override
getback to summary
public Object get(Object primaryKey)

Overrides org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.get.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.get.

Return null as no objects are cached.

Annotations
@Override
getCacheKeyback to summary
public CacheKey getCacheKey(Object searchKey, boolean forMerge)

Implements abstract org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.getCacheKey.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.getCacheKey.

Return null as no objects are cached.

Annotations
@Override
getSizeback to summary
public int getSize()

Implements abstract org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.getSize.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.getSize.

Return 0 as no objects are cached.

Annotations
@Override
getSizeback to summary
public int getSize(Class<?> myClass, boolean recurse)

Implements abstract org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.getSize.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.getSize.

Return 0 as no objects are cached.

Annotations
@Override
getWriteLockValueback to summary
public Object getWriteLockValue(Object primaryKey)

Overrides org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.getWriteLockValue.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.getWriteLockValue.

Return null as no objects are cached.

Annotations
@Override
keysback to summary
public Enumeration<CacheKey> keys()

Implements abstract org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.keys.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.keys.

Return an empty enumerator.

Annotations
@Override
keysback to summary
public Enumeration<CacheKey> keys(boolean checkReadLocks)

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.keys.

Return an empty enumerator.

Parameters
checkReadLocks:boolean

Doc from org.eclipse.persistence.internal.identitymaps.IdentityMap.keys.

- true if readLocks should be checked, false otherwise.

Annotations
@Override
lazyRelationshipLoadedback to summary
public void lazyRelationshipLoaded(Object object, ValueHolderInterface<T> valueHolder, ForeignReferenceMapping mapping)

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.lazyRelationshipLoaded.

Notify the cache that a lazy relationship has been triggered in the object and the cache may need to be updated

Annotations
@Override
putback to summary
public CacheKey put(Object primaryKey, Object object, Object writeLockValue, long readTime)

Implements abstract org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.put.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.put.

Do Nothing.

Parameters
primaryKey:Object

Doc from org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.put.

is the primary key for the object.

object:Object

Doc from org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.put.

is the domain object to cache.

writeLockValue:Object

Doc from org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.put.

is the current write lock value of object, if null the version is ignored.

Annotations
@Override
putCacheKeyIfAbsentback to summary
protected CacheKey putCacheKeyIfAbsent(CacheKey cacheKey)

Implements abstract org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.putCacheKeyIfAbsent.

Return null as no objects are cached.

Annotations
@Override
removeback to summary
public Object remove(Object primaryKey, Object object)

Overrides org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.remove.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.remove.

Do Nothing. Return null, since no objects are cached.

Annotations
@Override
removeback to summary
public Object remove(CacheKey searchKey)

Implements abstract org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.remove.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.remove.

Do Nothing. Return null, since no objects are cached.

Annotations
@Override
setWriteLockValueback to summary
public void setWriteLockValue(Object primaryKey, Object writeLockValue)

Overrides org.eclipse.persistence.internal.identitymaps.AbstractIdentityMap.setWriteLockValue.

Implements org.eclipse.persistence.internal.identitymaps.IdentityMap.setWriteLockValue.

Do Nothing.

Annotations
@Override