InvalidationTracker.Observer
public abstract class InvalidationTracker.Observer
An observer that can listen for changes in the database by subscribing to an InvalidationTracker
.
Summary
Protected constructors |
---|
Creates an observer for the given tables and views. |
Public methods |
|
---|---|
abstract void |
onInvalidated(@NonNull Set<@NonNull String> tables) Invoked when one of the observed tables is invalidated (changed). |
Public constructors
Protected constructors
Public methods
onInvalidated
public abstract void onInvalidated(@NonNull Set<@NonNull String> tables)
Invoked when one of the observed tables is invalidated (changed).
Parameters | |
---|---|
@NonNull Set<@NonNull String> tables |
A set of invalidated tables. When the observer is interested in multiple tables, this set can be used to distinguish which of the observed tables were invalidated. When observing a database view the names of underlying tables will be in the set instead of the view name. |