createReplica

abstract fun <T : Any> createReplica(    name: String,     settings: ReplicaSettings,     tags: Set<ReplicaTag> = emptySet(),     behaviours: List<ReplicaBehaviour<T>> = emptyList(),     storage: Storage<T>? = null,     fetcher: Fetcher<T>): PhysicalReplica<T>

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

Parameters

name

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

settings

configures replica behaviour. See: ReplicaSettings.

tags

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

behaviours

allow to add custom behaviours to a replica. See: ReplicaBehaviour.

storage

makes replica data persistent. See: Storage.

fetcher

configures how to load data from a network. See: Fetcher.