ObserverWrapper

@RestrictTo([Scope.LIBRARY]) protected class ObserverWrapper
kotlin.Any
   ↳ androidx.room.InvalidationTracker.ObserverWrapper

Wraps an observer and keeps the table information.

Internally table ids are used which may change from database to database so the table related information is kept here rather than in the Observer.

Summary

Public constructors
ObserverWrapper(observer: InvalidationTracker.Observer, tableIds: IntArray, tableNames: Array<String>)

Wraps an observer and keeps the table information.

Public methods
Unit
notifyByTableInvalidStatus(invalidatedTablesIds: Set<Int?>)

Notifies the underlying .mObserver if any of the observed tables are invalidated based on the given invalid status set.

Unit

Notifies the underlying .mObserver if it observes any of the specified tables.

Properties
InvalidationTracker.Observer

IntArray

Public constructors

ObserverWrapper

ObserverWrapper(
    observer: InvalidationTracker.Observer,
    tableIds: IntArray,
    tableNames: Array<String>)

Wraps an observer and keeps the table information.

Internally table ids are used which may change from database to database so the table related information is kept here rather than in the Observer.

Public methods

notifyByTableInvalidStatus

@RestrictTo([Scope.LIBRARY]) fun notifyByTableInvalidStatus(invalidatedTablesIds: Set<Int?>): Unit

Notifies the underlying .mObserver if any of the observed tables are invalidated based on the given invalid status set.

Parameters
invalidatedTablesIds: Set<Int?> The table ids of the tables that are invalidated.

notifyByTableNames

@RestrictTo([Scope.LIBRARY]) fun notifyByTableNames(tables: Array<out String>): Unit

Notifies the underlying .mObserver if it observes any of the specified tables.

Parameters
tables: Array<out String> The invalidated table names.

Properties

observer

val observer: InvalidationTracker.Observer

tableIds

val tableIds: IntArray