Package com.google.common.cache
Class LocalCache.HashIterator<T>
- java.lang.Object
-
- com.google.common.cache.LocalCache.HashIterator<T>
-
- All Implemented Interfaces:
java.util.Iterator<T>
- Direct Known Subclasses:
LocalCache.EntryIterator
,LocalCache.KeyIterator
,LocalCache.ValueIterator
- Enclosing class:
- LocalCache<K,V>
abstract class LocalCache.HashIterator<T> extends java.lang.Object implements java.util.Iterator<T>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) LocalCache.Segment<K,V>
currentSegment
(package private) java.util.concurrent.atomic.AtomicReferenceArray<LocalCache.ReferenceEntry<K,V>>
currentTable
(package private) LocalCache.WriteThroughEntry
lastReturned
(package private) LocalCache.ReferenceEntry<K,V>
nextEntry
(package private) LocalCache.WriteThroughEntry
nextExternal
(package private) int
nextSegmentIndex
(package private) int
nextTableIndex
-
Constructor Summary
Constructors Constructor Description HashIterator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) void
advance()
(package private) boolean
advanceTo(LocalCache.ReferenceEntry<K,V> entry)
Advances to the given entry.boolean
hasNext()
abstract T
next()
(package private) LocalCache.WriteThroughEntry
nextEntry()
(package private) boolean
nextInChain()
Finds the next entry in the current chain.(package private) boolean
nextInTable()
Finds the next entry in the current table.void
remove()
-
-
-
Field Detail
-
nextSegmentIndex
int nextSegmentIndex
-
nextTableIndex
int nextTableIndex
-
currentSegment
LocalCache.Segment<K,V> currentSegment
-
currentTable
java.util.concurrent.atomic.AtomicReferenceArray<LocalCache.ReferenceEntry<K,V>> currentTable
-
nextEntry
LocalCache.ReferenceEntry<K,V> nextEntry
-
nextExternal
LocalCache.WriteThroughEntry nextExternal
-
lastReturned
LocalCache.WriteThroughEntry lastReturned
-
-
Method Detail
-
advance
final void advance()
-
nextInChain
boolean nextInChain()
Finds the next entry in the current chain. Returns true if an entry was found.
-
nextInTable
boolean nextInTable()
Finds the next entry in the current table. Returns true if an entry was found.
-
advanceTo
boolean advanceTo(LocalCache.ReferenceEntry<K,V> entry)
Advances to the given entry. Returns true if the entry was valid, false if it should be skipped.
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<T>
-
nextEntry
LocalCache.WriteThroughEntry nextEntry()
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<T>
-
-