Transaction

Companion
object
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[T](v: Var[T]): TransactionChange

Returns the TransactionChange for the supplied Var or throws an exception if none exists

Returns the TransactionChange for the supplied Var or throws an exception if none exists

def change[T](owner: Var[T], oldFunction: () => T, newFunction: () => T): Unit

Called when the value of a Var changes

Called when the value of a Var changes

def commit(): Unit

Commits all changes in this Transaction and then clears the transaction

Commits all changes in this Transaction and then clears the transaction

def commit[T](v: Var[T]): Boolean

Redoes the transaction for this Var and then clears it from the transaction.

Redoes the transaction for this Var and then clears it from the transaction.

Returns

true if a change was applied

def get[T](v: Var[T]): Option[TransactionChange]

Gets the TransactionChange for the supplied Var if one is defined

Gets the TransactionChange for the supplied Var if one is defined

def redo(): Unit

Redoes all changes that occurred within this Transaction. Unlike commit, this doesn't clear the transaction. This allows undo to un-apply the transaction in the future.

Redoes all changes that occurred within this Transaction. Unlike commit, this doesn't clear the transaction. This allows undo to un-apply the transaction in the future.

def redo[T](v: Var[T]): Boolean

Redoes the transaction for this Var.

Redoes the transaction for this Var.

def revert(): Unit

Reverts all changes in this Transaction and then clears the transaction

Reverts all changes in this Transaction and then clears the transaction

def revert[T](v: Var[T]): Boolean

Undoes the transaction for this Var and then clears it from the transaction.

Undoes the transaction for this Var and then clears it from the transaction.

Returns

true if a change was applied

def undo(): Unit

Undoes all changes that occurred within this Transaction. Unlike revert, this doesn't clear the transaction. This allows redo to run to re-apply the transaction in the future.

Undoes all changes that occurred within this Transaction. Unlike revert, this doesn't clear the transaction. This allows redo to run to re-apply the transaction in the future.

def undo[T](v: Var[T]): Boolean

Undoes the transaction for this Var.

Undoes the transaction for this Var.