Class AbstractIdentityMapEnumeration<T>

    • Field Detail

      • nextKey

        protected CacheKey nextKey
        Next key to be returned.
      • shouldCheckReadLocks

        protected boolean shouldCheckReadLocks
        Value of true if readLocks should be checked or false otherwise.
    • Constructor Detail

      • AbstractIdentityMapEnumeration

        public AbstractIdentityMapEnumeration​(Collection<CacheKey> keys,
                                              boolean shouldCheckReadLocks)
        Creates an instance of CacheKey content enumeration.
        Parameters:
        keys - Collection of CacheKey instances to be iterated
        shouldCheckReadLocks - value of true if read lock on the CacheKey instances should be checked or false otherwise
    • Method Detail

      • hasMoreElements

        public boolean hasMoreElements()
        Check whether this enumeration contains more elements.
        Specified by:
        hasMoreElements in interface Enumeration<T>
        Returns:
        value of true if this enumeration object contains at least one more element to provide or false otherwise
      • nextElement

        public abstract T nextElement()
        Get next element of CacheKey content enumeration if this enumeration object has at least one more element to provide. It it expected that this method will be implemented using getNextElement() in child classes.
        Specified by:
        nextElement in interface Enumeration<T>
        Returns:
        the next element of this enumeration
        Throws:
        NoSuchElementException - if no more elements exist
      • getNextElement

        protected CacheKey getNextElement()
        Get next element of CacheKey instances enumeration if this enumeration object has at least one more element to provide.
        Returns:
        the next element of this enumeration
        Throws:
        NoSuchElementException - if no more elements exist