HBASE-18739 Make all TimeRange Constructors InterfaceAudience Private

This commit is contained in:
Michael Stack 2017-09-01 11:28:58 -07:00
parent a253e87704
commit 9dd458a8c7
1 changed files with 17 additions and 6 deletions

View File

@ -29,7 +29,8 @@ import org.apache.hadoop.hbase.util.Bytes;
* Evaluated according to minStamp <= timestamp < maxStamp
* or [minStamp,maxStamp) in interval notation.
* <p>
* Only used internally; should not be accessed directly by clients.
* Can be returned and read by clients. Should not be directly created by clients.
* Thus, all constructors are purposely @InterfaceAudience.Private.
*<p>Immutable. Thread-safe.
*/
@InterfaceAudience.Public
@ -43,9 +44,11 @@ public class TimeRange {
/**
* Default constructor.
* Represents interval [0, Long.MAX_VALUE) (allTime)
* @deprecated This is made @InterfaceAudience.Private in the 2.0 line and above
* @deprecated This is made @InterfaceAudience.Private in the 2.0 line and above and may be
* changed to private or removed in 3.0.
*/
@Deprecated
@InterfaceAudience.Private
public TimeRange() {
this(INITIAL_MIN_TIMESTAMP, INITIAL_MAX_TIMESTAMP);
}
@ -53,9 +56,11 @@ public class TimeRange {
/**
* Represents interval [minStamp, Long.MAX_VALUE)
* @param minStamp the minimum timestamp value, inclusive
* @deprecated This is made @InterfaceAudience.Private in the 2.0 line and above
* @deprecated This is made @InterfaceAudience.Private in the 2.0 line and above and may be
* changed to private or removed in 3.0.
*/
@Deprecated
@InterfaceAudience.Private
public TimeRange(long minStamp) {
this(minStamp, INITIAL_MAX_TIMESTAMP);
}
@ -63,9 +68,11 @@ public class TimeRange {
/**
* Represents interval [minStamp, Long.MAX_VALUE)
* @param minStamp the minimum timestamp value, inclusive
* @deprecated This is made @InterfaceAudience.Private in the 2.0 line and above
* @deprecated This is made @InterfaceAudience.Private in the 2.0 line and above and may be
* changed to private or removed in 3.0.
*/
@Deprecated
@InterfaceAudience.Private
public TimeRange(byte [] minStamp) {
this(Bytes.toLong(minStamp));
}
@ -74,9 +81,11 @@ public class TimeRange {
* Represents interval [minStamp, maxStamp)
* @param minStamp the minimum timestamp, inclusive
* @param maxStamp the maximum timestamp, exclusive
* @deprecated This is made @InterfaceAudience.Private in the 2.0 line and above
* @deprecated This is made @InterfaceAudience.Private in the 2.0 line and above and may be
* changed to private or removed in 3.0.
*/
@Deprecated
@InterfaceAudience.Private
public TimeRange(byte [] minStamp, byte [] maxStamp) {
this(Bytes.toLong(minStamp), Bytes.toLong(maxStamp));
}
@ -86,9 +95,11 @@ public class TimeRange {
* @param minStamp the minimum timestamp, inclusive
* @param maxStamp the maximum timestamp, exclusive
* @throws IllegalArgumentException if either <0,
* @deprecated This is made @InterfaceAudience.Private in the 2.0 line and above
* @deprecated This is made @InterfaceAudience.Private in the 2.0 line and above and may be
* changed to private or removed in 3.0.
*/
@Deprecated
@InterfaceAudience.Private
public TimeRange(long minStamp, long maxStamp) {
check(minStamp, maxStamp);
this.minStamp = minStamp;