Package com.google.cloud.spanner.watcher
Interface SpannerDatabaseChangeSetPoller.Builder
-
- All Known Subinterfaces:
SpannerDatabaseChangeSetPoller.Builder.TableExcluder
- Enclosing class:
- SpannerDatabaseChangeSetPoller
public static interface SpannerDatabaseChangeSetPoller.BuilderBuilder for aSpannerDatabaseChangeSetPoller.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceSpannerDatabaseChangeSetPoller.Builder.TableExcluderInterface for excluding specific tables from aSpannerDatabaseChangeSetPoller.static interfaceSpannerDatabaseChangeSetPoller.Builder.TableSelecterInterface for selecting the tables that should be monitored by aSpannerDatabaseChangeSetPoller.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SpannerDatabaseChangeSetPollerbuild()Creates aSpannerDatabaseChangeSetPollerfrom this builder.SpannerDatabaseChangeSetPoller.BuildersetCommitTimestampRepository(CommitTimestampRepository repository)Sets a specificCommitTimestampRepositoryto use for theSpannerTableTailers that are watching the change set table.SpannerDatabaseChangeSetPoller.BuildersetExecutor(ScheduledExecutorService executor)Sets a specificScheduledExecutorServiceto use for thisSpannerDatabaseChangeSetPoller.SpannerDatabaseChangeSetPoller.BuildersetPollInterval(org.threeten.bp.Duration interval)Sets the poll interval to use for thisSpannerDatabaseChangeSetPoller.
-
-
-
Method Detail
-
setCommitTimestampRepository
SpannerDatabaseChangeSetPoller.Builder setCommitTimestampRepository(CommitTimestampRepository repository)
Sets a specificCommitTimestampRepositoryto use for theSpannerTableTailers that are 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
SpannerDatabaseChangeSetPoller.Builder setPollInterval(org.threeten.bp.Duration interval)
Sets the poll interval to use for thisSpannerDatabaseChangeSetPoller. The default is 1 second.
-
setExecutor
SpannerDatabaseChangeSetPoller.Builder setExecutor(ScheduledExecutorService executor)
Sets a specificScheduledExecutorServiceto use for thisSpannerDatabaseChangeSetPoller. This executor will be used to execute the poll queries on the tables and to call theSpannerTableChangeWatcher.RowChangeCallbacks. The default will use aScheduledThreadPoolExecutorwith a core size equal to the number of tables that is being monitored.
-
build
SpannerDatabaseChangeSetPoller build()
Creates aSpannerDatabaseChangeSetPollerfrom this builder.
-
-