Module org.eclipse.persistence.core
Class IdentityMapKeyEnumeration
java.lang.Object
org.eclipse.persistence.internal.identitymaps.AbstractIdentityMapEnumeration<CacheKey>
org.eclipse.persistence.internal.identitymaps.IdentityMapKeyEnumeration
- All Implemented Interfaces:
Enumeration<CacheKey>
Allows to iterate over
CacheKey
instances stored in the IdentityMap
.-
Field Summary
Fields inherited from class org.eclipse.persistence.internal.identitymaps.AbstractIdentityMapEnumeration
cacheKeysIterator, nextKey, shouldCheckReadLocks
-
Constructor Summary
ConstructorDescriptionCreates an instance ofCacheKey
instances enumeration.IdentityMapKeyEnumeration
(Collection<CacheKey> keys, boolean shouldCheckReadLocks) Creates an instance ofCacheKey
instances enumeration. -
Method Summary
Modifier and TypeMethodDescriptionGet next element ofCacheKey
enumeration if this enumeration object has at least one more element to provide.Methods inherited from class org.eclipse.persistence.internal.identitymaps.AbstractIdentityMapEnumeration
getNextElement, hasMoreElements
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Enumeration
asIterator
-
Constructor Details
-
IdentityMapKeyEnumeration
Creates an instance ofCacheKey
instances enumeration. Checking of read lock on theCacheKey
instances is turned on.- Parameters:
keys
-Collection
ofCacheKey
instances to be iterated
-
IdentityMapKeyEnumeration
Creates an instance ofCacheKey
instances enumeration.- Parameters:
keys
-Collection
ofCacheKey
instances to be iteratedshouldCheckReadLocks
- value oftrue
if read lock on theCacheKey
instances should be checked orfalse
otherwise
-
-
Method Details
-
nextElement
Get next element ofCacheKey
enumeration if this enumeration object has at least one more element to provide.- Specified by:
nextElement
in interfaceEnumeration<CacheKey>
- Specified by:
nextElement
in classAbstractIdentityMapEnumeration<CacheKey>
- Returns:
- the next element of this enumeration
- Throws:
NoSuchElementException
- if no more elements exist
-