InternRoot

class InternRoot<TBase : Any>(val serializer: ISerializer<TBase> = Polymorphic()) : IInternRoot<TBase>

Constructors

Link copied to clipboard
fun <TBase : Any> InternRoot(serializer: ISerializer<TBase> = Polymorphic())

Functions

Link copied to clipboard
open override fun bind()

Sends child objects to the wire. This method is called after the parent sends this instance to the wire.

Link copied to clipboard
open override fun deepClone(): IRdBindable

Creates a clone of this IRdBindable not bound to any protocol

Link copied to clipboard
open override fun identify(identities: IIdentities, id: RdId)

Assigns IDs to this node and its child nodes in the graph.

Link copied to clipboard
open override fun intern(value: TBase): InternId

Interns a value and returns an ID for it. May return invalid ID if the value can't be interned due to multithreaded conflicts

Link copied to clipboard
open override fun onWireReceived(buffer: AbstractBuffer, dispatchHelper: IRdWireableDispatchHelper)

Callback that wire triggers when it receives messaged

Link copied to clipboard
open override fun preBind(    lf: Lifetime,     parent: IRdDynamic,     name: String)

Inserts the node into the object graph under the given parent and assigns the specified name to it. The node will be removed from the graph when the specified lf lifetime is terminated.

Link copied to clipboard
open override fun remove(value: TBase)

Removes interned value. Any future attempts to un-intern IDs previously associated with this value will fail. Not thread-safe. It's up to user to ensure that the value being removed is not being used in messages written on background threads.

Link copied to clipboard
open override fun tryGetInterned(value: TBase): InternId

Returns an ID for a value. Returns invalid ID if the value was not interned

Link copied to clipboard
open override fun <T : TBase> tryUnIntern(id: InternId): T?

Gets a valie from interned ID, returns null if no value matches the given ID

Link copied to clipboard
open override fun <T : TBase> unIntern(id: InternId): T

Gets a value from interned ID. Throws an exception if no value matches the given ID

Properties

Link copied to clipboard
open override 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.

Link copied to clipboard
open override var location: RName
Link copied to clipboard
var parent: IRdDynamic? = null
Link copied to clipboard
open override val protocol: IProtocol?
Link copied to clipboard
open override var rdid: RdId
Link copied to clipboard
open override val serializationContext: SerializationCtx?
Link copied to clipboard
val serializer: ISerializer<TBase>