Stay organized with collections
Save and categorize content based on your preferences.
DataSource.InvalidatedCallback
public
static
interface
DataSource.InvalidatedCallback
android.arch.paging.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 methods |
abstract
void
|
onInvalidated()
Called when the data backing the list has become invalid.
|
Public methods
onInvalidated
void onInvalidated ()
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.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# DataSource.InvalidatedCallback\n==============================\n\n| The `android.arch` Architecture Components packages are no longer maintained. They have been superseded by the corresponding [androidx.\\*](/jetpack/androidx/migrate) packages. See [androidx.paging.DataSource.InvalidatedCallback](/reference/androidx/paging/DataSource.InvalidatedCallback) instead.\n\n\n`\npublic\nstatic\n\n\ninterface\nDataSource.InvalidatedCallback\n`\n\n\n`\n\n\n`\n\n|----------------------------------------------------|\n| android.arch.paging.DataSource.InvalidatedCallback |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInvalidation callback for DataSource.\n\n\nUsed to signal when a DataSource a data source has become invalid, and that a new data source\nis needed to continue loading data.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onInvalidated](/reference/android/arch/paging/DataSource.InvalidatedCallback#onInvalidated())`() ` Called when the data backing the list has become invalid. |\n\nPublic methods\n--------------\n\n### onInvalidated\n\n```\nvoid onInvalidated ()\n```\n\nCalled when the data backing the list has become invalid. This callback is typically used\nto signal that a new data source is needed.\n\n\nThis callback will be invoked on the thread that calls [invalidate()](/reference/android/arch/paging/DataSource#invalidate()). It is valid\nfor the data source to invalidate itself during its load methods, or for an outside\nsource to invalidate it.\n\n\u003cbr /\u003e\n\n-\n\n Interfaces\n ----------\n\n - [DataSource.InvalidatedCallback](/reference/android/arch/paging/DataSource.InvalidatedCallback)\n-\n\n Classes\n -------\n\n - [AsyncPagedListDiffer](/reference/android/arch/paging/AsyncPagedListDiffer)\n - [DataSource](/reference/android/arch/paging/DataSource)\n - [DataSource.Factory](/reference/android/arch/paging/DataSource.Factory)\n - [ItemKeyedDataSource](/reference/android/arch/paging/ItemKeyedDataSource)\n - [ItemKeyedDataSource.LoadCallback](/reference/android/arch/paging/ItemKeyedDataSource.LoadCallback)\n - [ItemKeyedDataSource.LoadInitialCallback](/reference/android/arch/paging/ItemKeyedDataSource.LoadInitialCallback)\n - [ItemKeyedDataSource.LoadInitialParams](/reference/android/arch/paging/ItemKeyedDataSource.LoadInitialParams)\n - [ItemKeyedDataSource.LoadParams](/reference/android/arch/paging/ItemKeyedDataSource.LoadParams)\n - [LivePagedListBuilder](/reference/android/arch/paging/LivePagedListBuilder)\n - [PagedList](/reference/android/arch/paging/PagedList)\n - [PagedList.BoundaryCallback](/reference/android/arch/paging/PagedList.BoundaryCallback)\n - [PagedList.Builder](/reference/android/arch/paging/PagedList.Builder)\n - [PagedList.Callback](/reference/android/arch/paging/PagedList.Callback)\n - [PagedList.Config](/reference/android/arch/paging/PagedList.Config)\n - [PagedList.Config.Builder](/reference/android/arch/paging/PagedList.Config.Builder)\n - [PagedListAdapter](/reference/android/arch/paging/PagedListAdapter)\n - [PageKeyedDataSource](/reference/android/arch/paging/PageKeyedDataSource)\n - [PageKeyedDataSource.LoadCallback](/reference/android/arch/paging/PageKeyedDataSource.LoadCallback)\n - [PageKeyedDataSource.LoadInitialCallback](/reference/android/arch/paging/PageKeyedDataSource.LoadInitialCallback)\n - [PageKeyedDataSource.LoadInitialParams](/reference/android/arch/paging/PageKeyedDataSource.LoadInitialParams)\n - [PageKeyedDataSource.LoadParams](/reference/android/arch/paging/PageKeyedDataSource.LoadParams)\n - [PositionalDataSource](/reference/android/arch/paging/PositionalDataSource)\n - [PositionalDataSource.LoadInitialCallback](/reference/android/arch/paging/PositionalDataSource.LoadInitialCallback)\n - [PositionalDataSource.LoadInitialParams](/reference/android/arch/paging/PositionalDataSource.LoadInitialParams)\n - [PositionalDataSource.LoadRangeCallback](/reference/android/arch/paging/PositionalDataSource.LoadRangeCallback)\n - [PositionalDataSource.LoadRangeParams](/reference/android/arch/paging/PositionalDataSource.LoadRangeParams)\n - [RxPagedListBuilder](/reference/android/arch/paging/RxPagedListBuilder)"]]