Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

InvalidationTracker.Observer

public static abstract class InvalidationTracker.Observer
extends Object

java.lang.Object
   ↳ androidx.room.InvalidationTracker.Observer


An observer that can listen for changes in the database.

Summary

Public constructors

Observer(String[] tables)

Observes the given list of tables and views.

Protected constructors

Observer(String firstTable, String... rest)

Observes the given list of tables and views.

Public methods

abstract void onInvalidated(Set<String> tables)

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

Inherited methods

Public constructors

Observer

public Observer (String[] tables)

Observes the given list of tables and views.

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

Protected constructors

Observer

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

Observes the given list of tables and views.

Parameters
firstTable String: The name of the table or view.

rest String: More names of tables or views.

Public methods

onInvalidated

public abstract 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 you want to know which table is invalidated. This will be names of underlying tables when you are observing views.