voldemort.store.readonly.chunk
Class ChunkedFileSet.ROEntriesIterator

java.lang.Object
  extended by voldemort.store.readonly.chunk.ChunkedFileSet.ROEntriesIterator
All Implemented Interfaces:
java.util.Iterator<Pair<ByteArray,Versioned<byte[]>>>, ClosableIterator<Pair<ByteArray,Versioned<byte[]>>>
Enclosing class:
ChunkedFileSet

public static class ChunkedFileSet.ROEntriesIterator
extends java.lang.Object

Iterator for RO entries - Works only for ReadOnlyStorageFormat.READONLY_V2


Field Summary
protected  boolean coalesceCollided
           
 
Constructor Summary
ChunkedFileSet.ROEntriesIterator(ChunkedFileSet chunkedFileSet, java.util.concurrent.locks.ReadWriteLock modificationLock)
           
 
Method Summary
 void close()
          Close the iterator
protected  DataFileChunk getCurrentChunk()
           
protected  long getCurrentOffsetInChunk()
           
 boolean hasNext()
           
 Pair<ByteArray,Versioned<byte[]>> next()
           
 void remove()
           
 void updateOffset(long updatedOffset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coalesceCollided

protected boolean coalesceCollided
Constructor Detail

ChunkedFileSet.ROEntriesIterator

public ChunkedFileSet.ROEntriesIterator(ChunkedFileSet chunkedFileSet,
                                        java.util.concurrent.locks.ReadWriteLock modificationLock)
Method Detail

next

public Pair<ByteArray,Versioned<byte[]>> next()
Specified by:
next in interface java.util.Iterator<Pair<ByteArray,Versioned<byte[]>>>

close

public void close()
Description copied from interface: ClosableIterator
Close the iterator

Specified by:
close in interface ClosableIterator<T>

getCurrentChunk

protected DataFileChunk getCurrentChunk()

getCurrentOffsetInChunk

protected long getCurrentOffsetInChunk()

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<T>

updateOffset

public void updateOffset(long updatedOffset)

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<T>


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu