open class PagedTransactionRepository : TransactionRepository
Example of a repository that leverages the Room paging library to return a PagedList of transactions. Consumers can register as a page listener and receive an interface that allows for efficiently paging data.
pageSize
- transactions per page. This influences pre-fetch and memory configuration.
<init> |
Constructor that creates the database. PagedTransactionRepository(context: Context, pageSize: Int = 10, dataDbName: String = ZcashSdk.DB_DATA_NAME)
Example of a repository that leverages the Room paging library to return a PagedList of transactions. Consumers can register as a page listener and receive an interface that allows for efficiently paging data. PagedTransactionRepository(derivedDataDb: DerivedDataDb, pageSize: Int = 10) |
allTransactions |
A flow of all the inbound and outbound confirmed transactions open val allTransactions: Flow<PagedList<ConfirmedTransaction>> |
receivedTransactions |
A flow of all the inbound confirmed transactions open val receivedTransactions: Flow<PagedList<ConfirmedTransaction>> |
sentTransactions |
A flow of all the outbound confirmed transactions open val sentTransactions: Flow<PagedList<ConfirmedTransaction>> |
close |
Close the underlying database. fun close(): Unit |
findEncodedTransactionById |
Find the encoded transaction associated with the given id. open suspend fun findEncodedTransactionById(txId: Long): EncodedTransaction? |
findMinedHeight |
Find the mined height that matches the given raw tx_id in bytes. This is useful for matching a pending transaction with one that we've decrypted from the blockchain. open suspend fun findMinedHeight(rawTransactionId: ByteArray): Int? |
invalidate |
Provides a way for other components to signal that the underlying data has been modified. open fun invalidate(): Unit |
isInitialized |
Returns true when this repository has been initialized and seeded with the initial checkpoint. open fun isInitialized(): Boolean |
lastScannedHeight |
The last height scanned by this repository. open fun lastScannedHeight(): Int |
MIGRATION_3_4 |
val MIGRATION_3_4: Migration |