Cloud
Namespace: MBrace.Core
Cloud workflows user API
Static members
Static member | Description |
AsLocal(workflow)
Signature: workflow:Cloud<'T> -> LocalCloud<'T>
Type parameters: 'T |
Wraps provided cloud workflow as a local workflow. Any distributed parallelism combinators called by the workflow will be re-interpreted using thread parallelism semantics. |
AwaitProcess(...)
Signature: (cloudProcess:ICloudProcess<'T> * timeoutMilliseconds:int option) -> LocalCloud<'T>
Type parameters: 'T |
Asynchronously waits for a cloud process to complete and returns its result. |
AwaitTask(task, timeoutMilliseconds)
Signature: (task:Task * timeoutMilliseconds:int option) -> LocalCloud<unit>
|
Asynchronously awaits a System.Threading.Task for completion. |
AwaitTask(task, timeoutMilliseconds)
Signature: (task:Task<'T> * timeoutMilliseconds:int option) -> LocalCloud<'T>
Type parameters: 'T |
Asynchronously awaits a System.Threading.Task for completion. |
CancellationToken
Signature: LocalCloud<ICloudCancellationToken>
|
Gets the current cancellation token. CompiledName: |
Catch(workflow)
Signature: workflow:Cloud<'T> -> Cloud<Choice<'T,exn>>
Type parameters: 'T |
Catch exception from given cloud workflow. |
Choice(computations)
Signature: (computations:seq<'a * IWorkerRef>) -> Cloud<'T option>
Type parameters: 'a, 'T |
Returns a cloud computation that will execute the given computation on the corresponding worker, possibly in parallel and will return when any of the supplied computations have returned a successful value or if all of them fail to succeed. If a computation succeeds the rest of them are canceled. The success of a computation is encoded as an option type. This operator may create distribution. |
Choice(computations)
Signature: computations:seq<'a> -> Cloud<'T option>
Type parameters: 'a, 'T |
Returns a cloud computation that will execute given computations possibly in parallel and will return when any of the supplied computations have returned a successful value or if all of them fail to succeed. If a computation succeeds the rest of them are canceled. The success of a computation is encoded as an option type. This operator may create distribution. |
ChoiceEverywhere(computation)
Signature: (computation:Cloud<'T option>) -> Cloud<'T option>
Type parameters: 'T |
Returns a cloud computation that will execute the given computation on every available worker possibly in parallel and will return when any of the supplied computations have returned a successful value or if all of them fail to succeed. If a computation succeeds the rest of them are canceled. The success of a computation is encoded as an option type. This operator may create distribution. |
CreateCancellationTokenSource(parents)
Signature: (parents:ICloudCancellationToken []) -> LocalCloud<ICloudCancellationTokenSource>
|
Creates a new cloud cancellation token source |
CreateProcess(...)
Signature: (computation:Cloud<'T> * faultPolicy:FaultPolicy option * target:IWorkerRef option * cancellationToken:ICloudCancellationToken option * processName:string option) -> Cloud<ICloudProcess<'T>>
Type parameters: 'T |
Start cloud computation as a separate cloud process. Returns a cloud computation that queries the result. |
CurrentWorker
Signature: LocalCloud<IWorkerRef>
|
Gets information on the execution cluster. CompiledName: |
Dispose(disposable)
Signature: disposable:'Disposable -> LocalCloud<unit>
Type parameters: 'Disposable |
Disposes of a distributed resource. |
FaultPolicy
Signature: LocalCloud<FaultPolicy>
|
Gets the current fault policy. CompiledName: |
GetAvailableWorkers()
Signature: unit -> LocalCloud<IWorkerRef []>
|
Gets all workers in currently running cluster context. |
GetCloudProcessId()
Signature: unit -> LocalCloud<string>
|
Gets the assigned id of the currently running CloudProcess. |
GetWorkerCount()
Signature: unit -> LocalCloud<int>
|
Gets total number of available workers in cluster context. |
GetWorkItemId()
Signature: unit -> LocalCloud<string>
|
Gets the assigned id of the currently running cloud work item. |
Ignore(workflow)
Signature: workflow:Cloud<'T> -> Cloud<unit>
Type parameters: 'T |
Performs a cloud computations, discarding its result |
IsPreviouslyFaulted
Signature: LocalCloud<bool>
|
Returns true if the current computation is a retry of a previously faulted computation. CompiledName: |
IsTargetedWorkerSupported
Signature: LocalCloud<bool>
|
Returns true iff runtime supports executing workflows in specific worker. Should be used with combinators that support worker targeting like Cloud.Parallel/Choice/StartChild. CompiledName: |
Log(logEntry)
Signature: logEntry:string -> LocalCloud<unit>
|
Writes an entry to a logging provider, if it exists. |
Logf(fmt)
Signature: fmt:StringFormat<'?7879,LocalCloud<unit>> -> '?7879
Type parameters: '?7879 |
Writes an entry to a logging provider, if it exists. |
OfAsync(asyncWorkflow)
Signature: asyncWorkflow:Async<'T> -> LocalCloud<'T>
Type parameters: 'T |
Wraps an asynchronous workflow into a cloud workflow. |
Parallel(computations)
Signature: (computations:seq<'a * IWorkerRef>) -> Cloud<'T []>
Type parameters: 'a, 'T |
Creates a cloud computation that will execute given computations to targeted workers possibly in parallel and if successful returns the array of gathered results. This operator may create distribution. Exceptions raised by children carry cancellation semantics. |
Parallel(left, right)
Signature: (left:Cloud<'L> * right:Cloud<'R>) -> Cloud<'L * 'R>
Type parameters: 'L, 'R |
Creates a cloud computation that will execute the given computations possibly in parallel and if successful returns the pair of results. This operator may create distribution. Exceptions raised by children carry cancellation semantics. |
Parallel(computations)
Signature: computations:seq<'a> -> Cloud<'T []>
Type parameters: 'a, 'T |
Creates a cloud computation that will execute the given computations possibly in parallel and if successful returns the array of gathered results. This operator may create distribution. Exceptions raised by children carry cancellation semantics. |
ParallelEverywhere(computation)
Signature: computation:Cloud<'T> -> Cloud<'T []>
Type parameters: 'T |
Creates a cloud computation that will execute provided computation on every available worker in the cluster and if successful returns the array of gathered results. This operator may create distribution. Any exception raised by children carry cancellation semantics. |
Raise(e)
Signature: e:exn -> LocalCloud<'T>
Type parameters: 'T |
Raise an exception. |
Sleep(millisecondsDue)
Signature: millisecondsDue:int -> LocalCloud<unit>
|
Creates a cloud workflow that asynchronously sleeps for a given amount of time. |
StartChild(workflow, target)
Signature: (workflow:Cloud<'T> * target:IWorkerRef option) -> Cloud<LocalCloud<'T>>
Type parameters: 'T |
Start cloud computation as child process. Returns a cloud computation that queries the result. |
TryFinally(body, finalizer)
Signature: (body:Cloud<'T> * finalizer:LocalCloud<unit>) -> Cloud<'T>
Type parameters: 'T |
Try/Finally combinator for monadic finalizers. |
TryGetFaultData()
Signature: unit -> LocalCloud<FaultData option>
|
Attempts to fetch a fault data record for the current computation. Returns 'Some' if the current computation is a retry of a previously faulted computation or 'None' if no fault has occurred. |
WhenAll(processes)
Signature: (processes:ICloudProcess []) -> LocalCloud<unit>
|
Asynchronously waits until all of the given processes complete. |
WhenAny(processes)
Signature: (processes:ICloudProcess<'T> []) -> LocalCloud<ICloudProcess<'T>>
Type parameters: 'T |
Asynchronously waits until one of the given processes completes. |
WhenAny(processes)
Signature: (processes:ICloudProcess []) -> LocalCloud<ICloudProcess>
|
Asynchronously waits until one of the given processes completes. |
WithFaultPolicy(policy workflow)
Signature: policy:FaultPolicy -> workflow:Cloud<'T> -> Cloud<'T>
Type parameters: 'T |
Sets a new fault policy for given workflow. |