Class TimestampRange
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.spanner.changestreams.restriction.TimestampRange
-
- All Implemented Interfaces:
java.io.Serializable
public class TimestampRange extends java.lang.Object implements java.io.Serializable
A restriction represented by a range of timestamps [from, to).- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
com.google.cloud.Timestamp
getFrom()
Returns the range start timestamp (inclusive).com.google.cloud.Timestamp
getTo()
Returns the range end timestamp (exclusive).int
hashCode()
static TimestampRange
of(com.google.cloud.Timestamp from, com.google.cloud.Timestamp to)
Constructs a timestamp range.java.lang.String
toString()
-
-
-
Method Detail
-
of
public static TimestampRange of(com.google.cloud.Timestamp from, com.google.cloud.Timestamp to)
Constructs a timestamp range. The range represents a closed-open interval [from, to). The timestampto
must be greater or equal to the timestampfrom
, otherwise anIllegalArgumentException
will be thrown.
-
getFrom
public com.google.cloud.Timestamp getFrom()
Returns the range start timestamp (inclusive).
-
getTo
public com.google.cloud.Timestamp getTo()
Returns the range end timestamp (exclusive).
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(@Nullable java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-