Package com.google.cloud.spanner.watcher
Class SpannerTableChangeSetPoller.Builder
- java.lang.Object
-
- com.google.cloud.spanner.watcher.SpannerTableChangeSetPoller.Builder
-
- Enclosing class:
- SpannerTableChangeSetPoller
public static class SpannerTableChangeSetPoller.Builder extends Object
Builder for aSpannerTableChangeSetPoller.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpannerTableChangeSetPollerbuild()Creates theSpannerTableChangeSetPoller.SpannerTableChangeSetPoller.BuildersetChangeSetTableIdColumn(String column)Sets the name of the column that contains the change set id in the change set table (the table registering all transactions that should be watched).SpannerTableChangeSetPoller.BuildersetCommitTimestampRepository(CommitTimestampRepository repository)Sets theCommitTimestampRepositoryto use for theSpannerTableTailerthat is watching the change set table.SpannerTableChangeSetPoller.BuildersetDataTableChangeSetIdColumn(String column)Sets the name of the column that contains the change set id in the data table (the table that is being watched for changes).SpannerTableChangeSetPoller.BuildersetExecutor(ScheduledExecutorService executor)Sets the executor to use for polling for changes.SpannerTableChangeSetPoller.BuildersetPollInterval(org.threeten.bp.Duration interval)Sets the poll interval for the table.
-
-
-
Method Detail
-
setDataTableChangeSetIdColumn
public SpannerTableChangeSetPoller.Builder setDataTableChangeSetIdColumn(String column)
Sets the name of the column that contains the change set id in the data table (the table that is being watched for changes).
-
setChangeSetTableIdColumn
public SpannerTableChangeSetPoller.Builder setChangeSetTableIdColumn(String column)
Sets the name of the column that contains the change set id in the change set table (the table registering all transactions that should be watched).
-
setCommitTimestampRepository
public SpannerTableChangeSetPoller.Builder setCommitTimestampRepository(CommitTimestampRepository repository)
Sets theCommitTimestampRepositoryto use for theSpannerTableTailerthat is watching the change set table.If none is set, it will default to a
SpannerCommitTimestampRepositorywhich stores the last seen commit timestamp in a table named LAST_SEEN_COMMIT_TIMESTAMPS. The table will be created if it does not yet exist.
-
setPollInterval
public SpannerTableChangeSetPoller.Builder setPollInterval(org.threeten.bp.Duration interval)
Sets the poll interval for the table. Defaults to 1 second.
-
setExecutor
public SpannerTableChangeSetPoller.Builder setExecutor(ScheduledExecutorService executor)
Sets the executor to use for polling for changes.
-
build
public SpannerTableChangeSetPoller build()
Creates theSpannerTableChangeSetPoller.
-
-