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

ReadScope

public interface ReadScope<T extends Object> extends Closeable

Known direct subclasses
WriteScope

The scope used for a write transaction.


The scope used for a read transaction.

Summary

Public methods

abstract @NonNull T

Read the data from the underlying storage.

Inherited methods

From androidx.datastore.core.Closeable
abstract void

Closes the specified resource.

Public methods

readData

abstract @NonNullreadData()

Read the data from the underlying storage.