class RdPerContextMap<K : Any, V : RdBindableBase> : RdReactiveBase, IPerContextMap<K, V>
RdPerContextMap(context: RdContext<K>, valueFactory: (Boolean) -> V) |
val changing: <ERROR CLASS> |
|
val context: RdContext<K>
The context that is used by this map. Must be heavy. |
|
var optimizeNested: Boolean |
|
val valueFactory: (Boolean) -> V |
open var async: Boolean
If set to true, local changes to this object can be performed on any thread. Otherwise, local changes can be performed only on the UI thread. |
|
val defaultScheduler: <ERROR CLASS> |
|
var isLocalChange: Boolean |
|
var master: Boolean |
|
val serializers: ISerializers |
|
val wire: IWire |
|
open val wireScheduler: <ERROR CLASS>
Scheduler on which wire invokes callback onWireReceived. Default is the same as protocol's one. |
fun deepClone(): IRdBindable |
|
operator fun get(key: K): V?
Gets the value associated with specified context value, or null if none is associated When this map is not bound, this will automatically create a new mapping instead of returning null |
|
fun getForCurrentContext(): V
Gets the value associated with current context value, equivalent to get(context.value) If the context doesn't have a value set, or contexts's protocol value set does not contain the current context value, this will throw an exception |
|
fun init(lifetime: <ERROR CLASS>): Unit |
|
fun onWireReceived(buffer: AbstractBuffer): Unit
Callback that wire triggers when it receives messaged |
fun assertBound(): Unit |
|
fun assertThreading(): Unit |
fun <K : Any, V : RdBindableBase> read(key: RdContext<K>, buffer: AbstractBuffer, valueFactory: (Boolean) -> V): RdPerContextMap<K, V> |
|
fun write(buffer: AbstractBuffer, map: RdPerContextMap<*, *>): Unit |
fun <T : IRdBindable?> T.bind(lf: <ERROR CLASS>, parent: IRdDynamic, name: String): Unit? |
|
fun <T> T.deepClonePolymorphic(): T |
|
fun <T : IRdBindable?> T.identify(identities: IIdentities, ids: RdId): Unit? |
|
fun <T : RdBindableBase> T.static(id: Int): T |
|
fun <T : RdBindableBase> T.withId(id: RdId): T |
|
fun <T : RdBindableBase> T.withIdFromName(name: String): T |