new BurstTransaction( [id] [, parentContext])
Creates an instance of Burst transaction
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
id |
string |
<optional> |
Option fast update identifier |
parentContext |
olympe.df.ExecutionContext |
<optional> |
the context to which attach the transaction |
Methods
-
<static> getKey(instance, property)
-
Parameters:
Name Type Description instance
string property
string Returns:
- Type
- string
-
commit( [callback])
-
The transaction will be committed (orchestrator side) and its reverse transaction will be stored in the stack. Commit should be called only for reversible transactions.
Parameters:
Name Type Argument Description callback
olympe.dc.Manager.TransactionCallback <optional>
the callback to run when the undo is completed
-
complete()
-
Complete and close the burst transaction.
Returns:
- Type
- Promise.<void>
-
getContext()
-
Returns:
-
<package> getId()
-
Gets this Burst Transaction's identifier.
Returns:
- Type
- string
-
isReversible()
-
Check if the transaction can be used for undo/redo
Returns:
- Type
- boolean
-
notifyRollback(msg)
-
Parameters:
Name Type Description msg
string -
onRollback(callback)
-
Adds a callback to be triggered when a burst update fails and is beeing rolled back.
Parameters:
Name Type Description callback
function Returns:
this
-
push(object, values)
-
Push all the property values from the specified Observable to update the specified instance.
Parameters:
Name Type Description object
olympe.dc.Tag values
rxjs.Observable.<!Map.<!olympe.dc.registry.Property, *>> -
setAsReversible()
-
Sets this burst transaction as reversible (for undo/redo).
Returns:
-
setDebounceInterval(interval)
-
Set frequency of update messages sent to the datacloud
Parameters:
Name Type Description interval
number Returns:
this
-
stop()
-
Stops and sends the last updates in the data-cloud.
-
toString()
-
-
update(instance, property, flowValue)
-
Updates the value of a property of an instance each time the specified data-flow gets a new value.
Parameters:
Name Type Description instance
olympe.dc.InstanceTag The instance to update.
property
olympe.dc.InstanceTag The property to update.
flowValue
olympe.df.Proxy | olympe.df.FlowSource The data-flow used to update the property.
Type Definitions
-
Update(instanceTag, propertyTag, value)
-
Parameters:
Name Type Description instanceTag
string propertyTag
string value
*