UiStateReadRecords
class UiStateReadRecords(config: UiStateReadRecords.Config, binderEventListener: UiStateReadRecords.BinderEventListener? = null) : BinderObserver
A BinderObserver responsible for tracking and recording state reads in binders.
The UiStateReadRecords keeps a live record of which state is read and by who. These records are exclusively those that are read during the UI phases (namely Mount and Draw). These records may be used to determine which binders or draw hosts need to be re-bound or invalidated respectively, when a state that they read is updated, which can help to significantly optimize execution in the respective phases.
Parameters
config
Supplies the read tracking status and current treeId to the observer.
Constructors
Link copied to clipboard
constructor(config: UiStateReadRecords.Config, binderEventListener: UiStateReadRecords.BinderEventListener? = null)
Types
Link copied to clipboard
interface BinderEventListener
Optional listener for binder lifecycle events. Allows external systems (e.g., observability) to observe shouldUpdate results and bind durations without subclassing UiStateReadRecords.