{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

DataSource.InvalidatedCallback

{% setvar page_path %}androidx/paging/DataSource.InvalidatedCallback.html{% endsetvar %} {% setvar can_switch %}1{% endsetvar %} {% include "reference/_kotlin_switcher2.md" %}

interface DataSource.InvalidatedCallback


Invalidation callback for DataSource.

Used to signal when a DataSource a data source has become invalid, and that a new data source is needed to continue loading data.

Summary

Public functions

@<ERROR CLASS> Unit

Called when the data backing the list has become invalid.

Public functions

onInvalidated

@<ERROR CLASS>
fun onInvalidated(): @<ERROR CLASS> Unit

Called when the data backing the list has become invalid. This callback is typically used to signal that a new data source is needed.

This callback will be invoked on the thread that calls invalidate. It is valid for the data source to invalidate itself during its load methods, or for an outside source to invalidate it.