public class GenerationStamp extends Object implements WritableComparable<GenerationStamp>
限定符和类型 | 字段和说明 |
---|---|
static long |
FIRST_VALID_STAMP |
static long |
WILDCARD_STAMP |
构造器和说明 |
---|
GenerationStamp()
Create a new instance, initialized to FIRST_VALID_STAMP.
|
限定符和类型 | 方法和说明 |
---|---|
static int |
compare(long x,
long y) |
int |
compareTo(GenerationStamp that) |
boolean |
equals(Object o) |
static boolean |
equalsWithWildcard(long x,
long y) |
long |
getStamp()
Returns the current generation stamp
|
int |
hashCode() |
long |
nextStamp()
First increments the counter and then returns the stamp
|
void |
readFields(DataInput in)
Deserialize the fields of this object from
in . |
void |
setStamp(long stamp)
Sets the current generation stamp
|
void |
write(DataOutput out)
Serialize the fields of this object to
out . |
public static final long WILDCARD_STAMP
public static final long FIRST_VALID_STAMP
public GenerationStamp()
public long getStamp()
public void setStamp(long stamp)
public long nextStamp()
public void write(DataOutput out) throws IOException
Writable
out
.write
在接口中 Writable
out
- DataOuput
to serialize this object into.IOException
public void readFields(DataInput in) throws IOException
Writable
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
在接口中 Writable
in
- DataInput
to deseriablize this object from.IOException
public static int compare(long x, long y)
public int compareTo(GenerationStamp that)
compareTo
在接口中 Comparable<GenerationStamp>
public static boolean equalsWithWildcard(long x, long y)
Copyright © 2009 The Apache Software Foundation