createKeyedReplica

abstract fun <K : Any, T : Any> createKeyedReplica(    name: String,     childName: (K) -> String,     settings: KeyedReplicaSettings<K, T> = KeyedReplicaSettings(),     childSettings: (K) -> ReplicaSettings,     tags: Set<ReplicaTag> = emptySet(),     childTags: (K) -> Set<ReplicaTag> = { emptySet() },     behaviours: List<KeyedReplicaBehaviour<K, T>> = emptyList(),     childBehaviours: (K) -> List<ReplicaBehaviour<T>> = { emptyList() },     storage: KeyedStorage<K, T>? = null,     fetcher: KeyedFetcher<K, T>): KeyedPhysicalReplica<K, T>

Creates a KeyedPhysicalReplica. Note: once created a keyed replica will exist as long as a client exists.

Parameters

name

a human readable keyed replica name. Can be used for debugging (for example it is used by Replica Devtools). Shouldn't be unique.

childName

names for child replicas.

settings

configures keyed replica behaviour. See: KeyedReplicaSettings.

childSettings

ReplicaSettings for child replicas.

tags

set of ReplicaTags. Can be used to perform bulk operations on a subset of keyed replicas. See: cancelByTags, clearByTags, invalidateByTags.

childTags

tags for child replicas.

behaviours

allow to add custom behaviours to a keyed replica. See: KeyedReplicaBehaviour.

childBehaviours

custom behaviours for child replicas.

storage

makes keyed replica data persistent. See: KeyedStorage.

fetcher

configures how to loads data from a network. See: KeyedFetcher.