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<ReferenceEntry<K,V>>currentTable(package private) LocalCache.WriteThroughEntrylastReturned(package private) ReferenceEntry<K,V>nextEntry(package private) LocalCache.WriteThroughEntrynextExternal(package private) intnextSegmentIndex(package private) intnextTableIndex
-
Constructor Summary
Constructors Constructor Description HashIterator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) voidadvance()(package private) booleanadvanceTo(ReferenceEntry<K,V> entry)Advances to the given entry.booleanhasNext()abstract Tnext()(package private) LocalCache.WriteThroughEntrynextEntry()(package private) booleannextInChain()Finds the next entry in the current chain.(package private) booleannextInTable()Finds the next entry in the current table.voidremove()
-
-
-
Field Detail
-
nextSegmentIndex
int nextSegmentIndex
-
nextTableIndex
int nextTableIndex
-
currentSegment
LocalCache.Segment<K,V> currentSegment
-
currentTable
java.util.concurrent.atomic.AtomicReferenceArray<ReferenceEntry<K,V>> currentTable
-
nextEntry
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(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:
hasNextin interfacejava.util.Iterator<T>
-
nextEntry
LocalCache.WriteThroughEntry nextEntry()
-
remove
public void remove()
- Specified by:
removein interfacejava.util.Iterator<T>
-
-