public class Block extends Object implements Writable, Comparable<Block>
| 限定符和类型 | 字段和说明 |
|---|---|
static long |
GRANDFATHER_GENERATION_STAMP |
| 构造器和说明 |
|---|
Block() |
Block(Block blk) |
Block(File f,
long len,
long genstamp)
Find the blockid from the given filename
|
Block(long blkid) |
Block(long blkid,
long len,
long generationStamp) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
compareTo(Block b) |
boolean |
equals(Object o) |
long |
getBlockId() |
String |
getBlockName() |
long |
getGenerationStamp() |
long |
getNumBytes() |
Block |
getWithWildcardGS() |
int |
hashCode() |
static boolean |
isBlockFilename(File f) |
void |
readFields(DataInput in)
Deserialize the fields of this object from
in. |
void |
set(long blkid,
long len,
long genStamp) |
void |
setBlockId(long bid) |
void |
setGenerationStamp(long stamp) |
void |
setNumBytes(long len) |
String |
toString() |
void |
write(DataOutput out)
Serialize the fields of this object to
out. |
public static final long GRANDFATHER_GENERATION_STAMP
public Block()
public Block(long blkid,
long len,
long generationStamp)
public Block(long blkid)
public Block(Block blk)
public Block(File f, long len, long genstamp)
public static boolean isBlockFilename(File f)
public void set(long blkid,
long len,
long genStamp)
public long getBlockId()
public void setBlockId(long bid)
public String getBlockName()
public long getNumBytes()
public void setNumBytes(long len)
public long getGenerationStamp()
public void setGenerationStamp(long stamp)
public Block getWithWildcardGS()
public void write(DataOutput out) throws IOException
Writableout.write 在接口中 Writableout - DataOuput to serialize this object into.IOExceptionpublic void readFields(DataInput in) throws IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields 在接口中 Writablein - DataInput to deseriablize this object from.IOExceptionpublic int compareTo(Block b)
compareTo 在接口中 Comparable<Block>Copyright © 2009 The Apache Software Foundation