Package com.google.cloud.spanner.watcher
Interface CommitTimestampRepository
-
- All Known Implementing Classes:
SpannerCommitTimestampRepository
public interface CommitTimestampRepositoryInterface for storing the last seen commit timestamp by aSpannerTableChangeWatcherto a persistent repository.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description com.google.cloud.Timestampget(TableId table)Returns the last seen commit timestamp for the given table.default com.google.cloud.Timestampget(TableId table, com.google.cloud.spanner.Value shardValue)Returns the last seen commit timestamp for the given table and shard value.default voidset(TableId table, com.google.cloud.spanner.Value shardValue, com.google.cloud.Timestamp timestamp)Sets the last seen commit timestamp for the given table and shard value.voidset(TableId table, com.google.cloud.Timestamp commitTimestamp)Sets the last seen commit timestamp for the given table.
-
-
-
Method Detail
-
get
com.google.cloud.Timestamp get(TableId table)
Returns the last seen commit timestamp for the given table.
-
get
default com.google.cloud.Timestamp get(TableId table, @Nullable com.google.cloud.spanner.Value shardValue) throws UnsupportedOperationException
Returns the last seen commit timestamp for the given table and shard value. This method is optional and the default implementation will throwUnsupportedOperationException.- Throws:
UnsupportedOperationException
-
set
void set(TableId table, com.google.cloud.Timestamp commitTimestamp)
Sets the last seen commit timestamp for the given table.
-
set
default void set(TableId table, @Nullable com.google.cloud.spanner.Value shardValue, com.google.cloud.Timestamp timestamp) throws UnsupportedOperationException
Sets the last seen commit timestamp for the given table and shard value. This method is optional and the default implementation will throwUnsupportedOperationException.- Throws:
UnsupportedOperationException
-
-