StateRecord


Snapshot local value of a state object.

Summary

Public constructors

Cmn

This function is deprecated. Use snapshotId: Long constructor instead

Cmn
StateRecord(snapshotId: SnapshotId)
Cmn

Public functions

abstract Unit

Copy the value into this state record from another for the same state object.

Cmn
abstract StateRecord

Create a new state record for the same state object.

Cmn
open StateRecord
create(snapshotId: SnapshotId)

Create a new state record for the same state object and provided snapshotId.

Cmn

Public constructors

StateRecord

StateRecord()

StateRecord

StateRecord(id: Int)

StateRecord

StateRecord(snapshotId: SnapshotId)

Public functions

assign

abstract fun assign(value: StateRecord): Unit

Copy the value into this state record from another for the same state object.

create

abstract fun create(): StateRecord

Create a new state record for the same state object. Consider also implementing the create overload that provides snapshotId for faster record construction when snapshot id is known.

create

open fun create(snapshotId: SnapshotId): StateRecord

Create a new state record for the same state object and provided snapshotId. This allows to implement an optimized version of create to avoid accessing currentSnapshot when snapshot id is known. The default implementation provides a backwards compatible behavior, and should be overridden if StateRecord subclass supports this optimization.