InvalidationTracker.Observer



An observer that can listen for changes in the database by subscribing to an InvalidationTracker.

Summary

Public constructors

Observer(tables: Array<String>)
Cmn
N

Protected constructors

Observer(firstTable: String, vararg rest: String)

Creates an observer for the given tables and views.

Cmn
N

Public functions

abstract Unit

Invoked when one of the observed tables is invalidated (changed).

Cmn
N

Public constructors

Observer

Observer(tables: Array<String>)
Parameters
tables: Array<String>

The names of the tables this observer is interested in getting notified if they are modified.

Protected constructors

Observer

protected Observer(firstTable: String, vararg rest: String)

Creates an observer for the given tables and views.

Parameters
firstTable: String

The name of the table or view.

vararg rest: String

More names of tables or views.

Public functions

onInvalidated

abstract fun onInvalidated(tables: Set<String>): Unit

Invoked when one of the observed tables is invalidated (changed).

Parameters
tables: Set<String>

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.