Skip to content

Most visited

Recently visited

navigation
added in version 1.0.0
belongs to Maven artifact android.arch.persistence.room:runtime:1.0.0

InvalidationTracker.Observer

public static abstract class InvalidationTracker.Observer
extends Object

java.lang.Object
   ↳ android.arch.persistence.room.InvalidationTracker.Observer


An observer that can listen for changes in the database.

Summary

Public constructors

InvalidationTracker.Observer(String[] tables)

Observes the given list of tables.

Protected constructors

InvalidationTracker.Observer(String firstTable, String... rest)

Observes the given list of tables.

Public methods

abstract void onInvalidated(Set<String> tables)

Called when one of the observed tables is invalidated in the database.

Inherited methods

From class java.lang.Object

Public constructors

InvalidationTracker.Observer

added in version 1.0.0
InvalidationTracker.Observer (String[] tables)

Observes the given list of tables.

Parameters
tables String: The list of tables to observe for changes.

Protected constructors

InvalidationTracker.Observer

added in version 1.0.0
InvalidationTracker.Observer (String firstTable, 
                String... rest)

Observes the given list of tables.

Parameters
firstTable String: The table name

rest String: More table names

Public methods

onInvalidated

added in version 1.0.0
void onInvalidated (Set<String> tables)

Called when one of the observed tables is invalidated in the database.

Parameters
tables Set: A set of invalidated tables. This is useful when the observer targets multiple tables and want to know which table is invalidated.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)