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.SerializableA 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 booleanequals(java.lang.Object o)com.google.cloud.TimestampgetFrom()Returns the range start timestamp (inclusive).com.google.cloud.TimestampgetTo()Returns the range end timestamp (exclusive).inthashCode()static TimestampRangeof(com.google.cloud.Timestamp from, com.google.cloud.Timestamp to)Constructs a timestamp range.java.lang.StringtoString()
-
-
-
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 timestamptomust be greater or equal to the timestampfrom, otherwise anIllegalArgumentExceptionwill 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:
toStringin classjava.lang.Object
-
equals
public boolean equals(@Nullable java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-