run


Description:

public bool run (Cancellable? cancellable = null) throws Error

Run the BatchOperation synchronously.

This will send all the operations in the batch operation to the server, and call their respective callbacks synchronously (i.e. before run returns, and in the same thread that called run) as the server returns results for each operation.

The callbacks for all of the operations in the batch operation are always guaranteed to be called, even if the batch operation as a whole fails. Each callback will be called exactly once for each time run is called.

The return value of the function indicates whether the overall batch operation was successful, and doesn't indicate the status of any of the operations it comprises. run could return true even if all of its operations failed.

cancellable can be used to cancel the entire batch operation any time before or during the network activity. If cancellable is cancelled after network activity has finished, run will continue and finish as normal.

Parameters:

this

a BatchOperation

cancellable

a Cancellable, or null

Returns:

true on success, false otherwise