|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.io.TimeRange
public class TimeRange
Represents an interval of version timestamps.
Evaluated according to minStamp <= timestamp < maxStamp or [minStamp,maxStamp) in interval notation.
Only used internally; should not be accessed directly by clients.
Constructor Summary | |
---|---|
TimeRange()
Default constructor. |
|
TimeRange(byte[] minStamp)
Represents interval [minStamp, Long.MAX_VALUE) |
|
TimeRange(byte[] minStamp,
byte[] maxStamp)
Represents interval [minStamp, maxStamp) |
|
TimeRange(long minStamp)
Represents interval [minStamp, Long.MAX_VALUE) |
|
TimeRange(long minStamp,
long maxStamp)
Represents interval [minStamp, maxStamp) |
Method Summary | |
---|---|
long |
getMax()
|
long |
getMin()
|
void |
readFields(DataInput in)
|
String |
toString()
|
boolean |
withinOrAfterTimeRange(long timestamp)
Check if the specified timestamp is within this TimeRange. |
boolean |
withinTimeRange(byte[] bytes,
int offset)
Check if the specified timestamp is within this TimeRange. |
boolean |
withinTimeRange(long timestamp)
Check if the specified timestamp is within this TimeRange. |
void |
write(DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TimeRange()
public TimeRange(long minStamp)
minStamp
- the minimum timestamp value, inclusivepublic TimeRange(byte[] minStamp)
minStamp
- the minimum timestamp value, inclusivepublic TimeRange(long minStamp, long maxStamp) throws IOException
minStamp
- the minimum timestamp, inclusivemaxStamp
- the maximum timestamp, exclusive
IOException
public TimeRange(byte[] minStamp, byte[] maxStamp) throws IOException
minStamp
- the minimum timestamp, inclusivemaxStamp
- the maximum timestamp, exclusive
IOException
Method Detail |
---|
public long getMin()
public long getMax()
public boolean withinTimeRange(byte[] bytes, int offset)
Returns true if within interval [minStamp, maxStamp), false if not.
bytes
- timestamp to checkoffset
- offset into the bytes
public boolean withinTimeRange(long timestamp)
Returns true if within interval [minStamp, maxStamp), false if not.
timestamp
- timestamp to check
public boolean withinOrAfterTimeRange(long timestamp)
Returns true if within interval [minStamp, maxStamp), false if not.
timestamp
- timestamp to check
public String toString()
toString
in class Object
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |