org.apache.hadoop.hdfs.protocol
Class BlockListAsLongs.BlockReportIterator

java.lang.Object
  extended by org.apache.hadoop.hdfs.protocol.BlockListAsLongs.BlockReportIterator
All Implemented Interfaces:
Iterator<Block>
Enclosing class:
BlockListAsLongs

@InterfaceAudience.Private
@InterfaceStability.Evolving
public class BlockListAsLongs.BlockReportIterator
extends Object
implements Iterator<Block>

Iterates over blocks in the block report. Avoids object allocation on each iteration.


Method Summary
 HdfsConstants.ReplicaState getCurrentReplicaState()
          Get the state of the current replica.
 boolean hasNext()
           
 Block next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<Block>

next

public Block next()
Specified by:
next in interface Iterator<Block>

remove

public void remove()
Specified by:
remove in interface Iterator<Block>

getCurrentReplicaState

public HdfsConstants.ReplicaState getCurrentReplicaState()
Get the state of the current replica. The state corresponds to the replica returned by the latest next().



Copyright © 2009 The Apache Software Foundation