Interface BlockIterator<T>
- Type Parameters:
T-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
AbstractDatanodeStore.KeyValueBlockIterator,AbstractDatanodeStore.KeyValueBlockLocalIdIterator
Block Iterator for container. Each container type need to implement this
interface.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanhasNext()This checks if iterator has next element.Get next block in the container.voidSeek to first entry.voidSeek to last entry.
-
Method Details
-
hasNext
This checks if iterator has next element. If it has returns true, otherwise false.- Returns:
- boolean
- Throws:
IOException
-
seekToFirst
void seekToFirst()Seek to first entry. -
seekToLast
void seekToLast()Seek to last entry. -
nextBlock
Get next block in the container.- Returns:
- next block or null if there are no blocks
- Throws:
IOExceptionNoSuchElementException
-