public interface SpannerTableChangeWatcher
extends com.google.api.core.ApiService
| Modifier and Type | Interface and Description |
|---|---|
static interface |
SpannerTableChangeWatcher.Row
Row is passed in to the change callback and allows access to the most recent data.
|
static interface |
SpannerTableChangeWatcher.RowChangeCallback
Interface for receiving asynchronous callbacks when a row has been inserted or updated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCallback(SpannerTableChangeWatcher.RowChangeCallback callback)
Adds a
SpannerTableChangeWatcher.RowChangeCallback for this SpannerTableChangeWatcher. |
TableId |
getTable()
Returns the id of the table that is monitored by this watcher.
|
TableId getTable()
void addCallback(SpannerTableChangeWatcher.RowChangeCallback callback)
SpannerTableChangeWatcher.RowChangeCallback for this SpannerTableChangeWatcher. Callbacks may only
be added when the ApiService.state() of this SpannerTableChangeWatcher is State#NEW. Callbacks should be lightweight and non-blocking. The callback should hand off any
heavy computations or blocking operations to a non-blocking executor or buffer.
The SpannerTableChangeWatcher guarantees that at most one SpannerTableChangeWatcher.RowChangeCallback
will be active at any given time, and all callbacks will receive all changes in order of commit
timestamp. There is no guarantee as to the order of which callback is called first if a SpannerTableChangeWatcher has registered multiple callbacks.
Copyright © 2022 Google LLC. All rights reserved.