@DefaultCoder(value=AvroCoder.class) public class PartitionMetadata extends java.lang.Object implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
PartitionMetadata.Builder
Partition metadata builder for better user experience.
|
static class |
PartitionMetadata.State
The state at which a partition can be in the system:
CREATED: the partition has been created, but no query has been done against it yet.
|
Constructor and Description |
---|
PartitionMetadata(java.lang.String partitionToken,
java.util.HashSet<java.lang.String> parentTokens,
com.google.cloud.Timestamp startTimestamp,
com.google.cloud.Timestamp endTimestamp,
long heartbeatMillis,
PartitionMetadata.State state,
com.google.cloud.Timestamp watermark,
com.google.cloud.Timestamp createdAt,
com.google.cloud.Timestamp scheduledAt,
com.google.cloud.Timestamp runningAt,
com.google.cloud.Timestamp finishedAt) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
com.google.cloud.Timestamp |
getCreatedAt()
The time at which this partition was first detected and created in the metadata table.
|
com.google.cloud.Timestamp |
getEndTimestamp()
The end time for querying this given partition.
|
com.google.cloud.Timestamp |
getFinishedAt()
The time at which the connector finished processing this partition.
|
long |
getHeartbeatMillis()
The number of milliseconds after the stream is idle, which a heartbeat record will be emitted
in the change stream query.
|
java.util.HashSet<java.lang.String> |
getParentTokens()
The unique partition identifiers of the parent partitions where this child partition originated
from.
|
java.lang.String |
getPartitionToken()
Unique partition identifier, which can be used to perform a change stream query.
|
com.google.cloud.Timestamp |
getRunningAt()
The time at which the connector started processing this partition.
|
com.google.cloud.Timestamp |
getScheduledAt()
The time at which this partition was scheduled to be queried.
|
com.google.cloud.Timestamp |
getStartTimestamp()
It is the start time at which the partition started existing in Cloud Spanner.
|
PartitionMetadata.State |
getState()
The state in which the current partition is in.
|
com.google.cloud.Timestamp |
getWatermark()
The time for which all records with a timestamp less than it have been processed.
|
int |
hashCode() |
static PartitionMetadata.Builder |
newBuilder()
Creates a builder for constructing a partition metadata instance.
|
PartitionMetadata.Builder |
toBuilder()
Transforms the instance into a builder, so field values can be modified.
|
java.lang.String |
toString() |
public PartitionMetadata(java.lang.String partitionToken, java.util.HashSet<java.lang.String> parentTokens, com.google.cloud.Timestamp startTimestamp, @Nullable com.google.cloud.Timestamp endTimestamp, long heartbeatMillis, PartitionMetadata.State state, com.google.cloud.Timestamp watermark, com.google.cloud.Timestamp createdAt, @Nullable com.google.cloud.Timestamp scheduledAt, @Nullable com.google.cloud.Timestamp runningAt, @Nullable com.google.cloud.Timestamp finishedAt)
public java.lang.String getPartitionToken()
public java.util.HashSet<java.lang.String> getParentTokens()
public com.google.cloud.Timestamp getStartTimestamp()
@Nullable public com.google.cloud.Timestamp getEndTimestamp()
public long getHeartbeatMillis()
public PartitionMetadata.State getState()
public com.google.cloud.Timestamp getWatermark()
public com.google.cloud.Timestamp getCreatedAt()
@Nullable public com.google.cloud.Timestamp getScheduledAt()
@Nullable public com.google.cloud.Timestamp getRunningAt()
@Nullable public com.google.cloud.Timestamp getFinishedAt()
public PartitionMetadata.Builder toBuilder()
public boolean equals(@Nullable java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static PartitionMetadata.Builder newBuilder()