| <html devsite="true"> |
| <head> |
| <title>DataSource.InvalidatedCallback</title> |
| {% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} |
| {% include "_shared/_reference-head-tags.html" %} |
| </head> |
| <body> |
| <div itemscope="" itemtype="http://developers.google.com/ReferenceObject"> |
| <meta itemprop="name" content="DataSource.InvalidatedCallback"> |
| <meta itemprop="path" content="androidx.paging"> |
| <meta itemprop="property" content="onInvalidated()"> |
| <meta itemprop="language" content="JAVA"> |
| </div> |
| <div id="header-block"> |
| <div> |
| <h1>DataSource.InvalidatedCallback</h1> |
| </div> |
| <div id="metadata-info-block"> |
| <div id="source-link"><a href="https://cs.android.com/search?q=file:androidx/paging/DataSource.kt+class:androidx.paging.DataSource.InvalidatedCallback&ss=androidx/platform/frameworks/support" class="external">View Source</a></div> |
| </div> |
| </div> |
| <div id="refdoc-switcher-placeholder"></div> |
| <p> |
| <pre>public fun interface <a href="/reference/androidx/paging/DataSource.InvalidatedCallback.html">DataSource.InvalidatedCallback</a></pre> |
| </p> |
| <hr> |
| <p>Invalidation callback for <code><a href="/reference/androidx/paging/DataSource.html">DataSource</a></code>.</p> |
| <p>Used to signal when a <code><a href="/reference/androidx/paging/DataSource.html">DataSource</a></code> a data source has become invalid, and that a new data source is needed to continue loading data.</p> |
| <h2>Summary</h2> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <colgroup> |
| <col width="40%"> |
| <col> |
| </colgroup> |
| <thead> |
| <tr> |
| <th colspan="100%"><h3>Public methods</h3></th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td><code>abstract void</code></td> |
| <td> |
| <div><code>@<a href="/reference/androidx/annotation/AnyThread.html">AnyThread</a><br><a href="/reference/androidx/paging/DataSource.InvalidatedCallback.html#onInvalidated()">onInvalidated</a>()</code></div> |
| <p>Called when the data backing the list has become invalid.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="list"> |
| <h2>Public methods</h2> |
| <div class="api-item"><a name="onInvalidated--"></a><a name="oninvalidated"></a> |
| <div class="api-name-block"> |
| <div> |
| <h3 id="onInvalidated()">onInvalidated</h3> |
| </div> |
| </div> |
| <pre class="api-signature no-pretty-print">@<a href="/reference/androidx/annotation/AnyThread.html">AnyThread</a><br>abstract void <a href="/reference/androidx/paging/DataSource.InvalidatedCallback.html#onInvalidated()">onInvalidated</a>()</pre> |
| <p>Called when the data backing the list has become invalid. This callback is typically used to signal that a new data source is needed.</p> |
| <p>This callback will be invoked on the thread that calls <code><a href="/reference/androidx/paging/DataSource.html#invalidate()">invalidate</a></code>. It is valid for the data source to invalidate itself during its load methods, or for an outside source to invalidate it.</p> |
| </div> |
| </div> |
| </body> |
| </html> |