|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectca.uhn.cache.internal.impl.ChunkIterator
Default implementation of IChunkIterator. The default close() method does nothing, and should be overridden to perform any required cleanup. Note that this class is NOT thread-safe in the sense of supporting multiple iterating clients (although different threads may add and iterate concurrently).
| Constructor Summary | |
ChunkIterator()
New instance. |
|
| Method Summary | |
void |
add(IChunk theChunk)
|
void |
close()
Does nothing by default (override if you want to do something here). |
void |
finished()
Must be called when all items have been added. |
boolean |
hasNext()
|
IChunk |
next()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ChunkIterator()
| Method Detail |
public void add(IChunk theChunk)
theChunk - a chunk to be added to the iteration list.public void finished()
public boolean hasNext()
hasNext in interface IChunkIteratorIChunkIterator.hasNext()
public IChunk next()
throws java.util.NoSuchElementException
next in interface IChunkIteratorjava.util.NoSuchElementException - if called when hasNext() returns false
TODO: throw same exception as IChunkStore (none currently) on errorIChunkIterator.next()public void close()
close in interface IChunkIteratorIChunkIterator.close()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||