Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

package org.mobilenativefoundation.store.cache5

import org.mobilenativefoundation.store.core5.ExperimentalStoreApi
import org.mobilenativefoundation.store.core5.KeyProvider
import org.mobilenativefoundation.store.core5.StoreData
import org.mobilenativefoundation.store.core5.StoreKey
Expand All @@ -12,6 +13,7 @@ import org.mobilenativefoundation.store.core5.StoreKey
* Depends on [StoreMultiCacheAccessor] for internal data management.
* @see [Cache].
*/
@OptIn(ExperimentalStoreApi::class)
class StoreMultiCache<Id : Any, Key : StoreKey<Id>, Single : StoreData.Single<Id>, Collection : StoreData.Collection<Id, Single>, Output : StoreData<Id>>(
private val keyProvider: KeyProvider<Id, Single>,
singlesCache: Cache<StoreKey.Single<Id>, Single> = CacheBuilder<StoreKey.Single<Id>, Single>().build(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface StoreKey<out Id : Any> {
/**
* Represents a key for fetching an individual item.
*/
interface Single<Id : Any> : StoreKey<Id> {
interface Single<out Id : Any> : StoreKey<Id> {
val id: Id
}

Expand Down
246 changes: 0 additions & 246 deletions paging/docs/design_doc.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.mobilenativefoundation.store.paging5

import org.mobilenativefoundation.store.core5.ExperimentalStoreApi
import org.mobilenativefoundation.store.core5.StoreData
import org.mobilenativefoundation.store.core5.StoreKey

@ExperimentalStoreApi
interface Joiner<Id : Any, K : StoreKey<Id>, SO : StoreData.Single<Id>> {
suspend operator fun invoke(data: Map<K, PagingData<Id, SO>>): PagingData<Id, SO>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package org.mobilenativefoundation.store.paging5

import org.mobilenativefoundation.store.core5.ExperimentalStoreApi
import org.mobilenativefoundation.store.core5.StoreKey

@ExperimentalStoreApi
interface KeyFactory<Id : Any, SK : StoreKey.Single<Id>> {
fun createFor(id: Id): SK
}
Loading