ClusterJobScheduler Class |
Namespace: AGI.Parallel.Client
The ClusterJobScheduler type exposes the following members.
Name | Description | |
---|---|---|
ClusterJobScheduler |
Initializes a new instance of the ClusterJobScheduler class.
| |
ClusterJobScheduler(String) |
Initializes a new instance of the ClusterJobScheduler class with the specified Coordinator host name.
| |
ClusterJobScheduler(String, Int32, Boolean, Boolean, Boolean, String, Boolean, String, String) |
Initializes a new instance of the ClusterJobScheduler class with the specified Coordinator host name, port, and security options.
|
Name | Description | |
---|---|---|
AllowSelfSignedCertificates |
Gets or sets a value indicating whether to allow self-signed certificates when communicating with the Coordinator.
| |
ClientCertificateFile |
Gets or sets the certificate file.
| |
ClientCertificateName |
Gets or sets the subject distinguished name of the certificate in the local Windows certificate store to authenticate.
| |
ClientCertificateThumbprint |
Gets or sets the certificate using the SHA1 thumbprint.
| |
ConnectReadTimeOut |
Gets or sets the connect read time out in milliseconds.
| |
CoordinatorMachineName |
Gets or sets the name of the coordinator.
| |
CoordinatorPort |
Gets or sets port number of the Coordinator.
| |
CoordinatorReconnectionDelay |
Gets or sets the amount of time, in milliseconds, the scheduler should wait before attempting to reconnect to the Coordinator.
| |
CoordinatorReconnectionInterval |
Gets or sets the amount of time, in milliseconds, the scheduler should wait in between each reconnection attempt.
| |
CoordinatorThumbprint |
Gets or sets the Coordinator thumbprint.
The client checks this thumbprint matches that of the Coordinator's security certificate to ensure it can trust the Coordinator.
| |
Id |
Gets the id of this job scheduler.
| |
IsConnected |
Gets a value indicating whether the job scheduler is connected.
| |
MaximumReconnectionAttempts |
Gets or sets the maximum number of times the job scheduler should try to reconnect to the Coordinator before aborting.
| |
ProvideClientCertificate |
Gets or sets a value indicating whether to send a client certificate when authenticating.
| |
SslClientAuthenticationTimeOut |
Gets or sets the SSL authentication timeout specified in milliseconds.
| |
UseSsl |
Gets or sets a value indicating whether to use SSL when communicating with the Coordinator.
| |
VerifyCoordinatorThumbprint |
Gets or sets a value indicating whether to verify the coordinator thumbprint.
|
Name | Description | |
---|---|---|
CancelJob |
Cancels the job with the specified id.
| |
CancelTask |
Cancels the task with the specified id.
| |
CheckCapability(ICapabilityCheck) |
Checks capability on all the agents.
| |
CheckCapability(ICapabilityCheck, IListTaskPrecondition) |
Checks capability on agents which meets the specified precondition.
| |
Connect |
Connects client to specified cluster scheduler.
| |
CreateJob |
Returns a new job that can later be used to submit to the job scheduler.
| |
Disconnect |
Disconnects client from specified job scheduler.
| |
Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetAgentInfo |
Returns the list of agents and their current states.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetLicenseInfo |
Gets the license info that matches the provided license parameters.
| |
GetMaximumHostCount |
Returns the maximum number of hosts that is available to the job scheduler.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetUserAuthorization |
Determines whether the user is authorized for the job submission protocol.
| |
GetVersionInfo |
Gets the version info of the job scheduler.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnCoordinatorDisconnected |
Called when the job scheduler connection with the Coordinator is interrupted.
Attempts to reestablish a connection with the Coordinator until either a connection
is obtained or the maximum number of attempts to reconnect has been reached.
| |
PostMessage(Object, Guid) |
Posts a message to the specified target mailbox.
| |
PostMessage(Object, Guid, Boolean) |
Posts a message to the specified target mailbox.
| |
ReceiveMessage |
Receives a message from the participant's mailbox. Blocks the current thread until a message arrives.
| |
ReceiveMessage(Guid) |
Receives a message from the participant's mailbox. Blocks the current thread until a message arrives.
| |
ReceiveMessage(Int32) |
Receives a message from the participant's mailbox. Blocks the current thread until a message arrives.
| |
ReceiveMessage(Int32, Guid) |
Receives a message from the participant's mailbox. Blocks the current thread until a message arrives.
| |
SubmitJob |
Submits job to the job scheduler so the job scheduler can add the job to its queue.
| |
ToString | Returns a string that represents the current object. (Overrides ObjectToString.) | |
WaitUntilDone |
Blocks until all tasks in this job complete or the operation times out.
The callback passed in for the heartbeat is called with the period
specified by the millisecondsHeartbeat argument.
|
Name | Description | |
---|---|---|
NewMessage |
Occurs when a new message arrives.
|
using System; using AGI.Parallel.Client; using AGI.Parallel.Infrastructure; namespace CodeSamples { class Program { static void Main(string[] args) { // Create the ClusterJobScheduler class. // Specify the hostname and optionally the port number in the ClusterJobScheduler constructor. // You must ensure you call the Dispose method. In this method we are utilizing the using statement. using (IJobScheduler scheduler = new ClusterJobScheduler("localhost")) { // Before you use any methods on the object, you must call Connect. try { scheduler.Connect(); // Create a job, add a task, and submit. Job job = scheduler.CreateJob(); job.AddTask(new HelloTask()); job.Submit(); job.WaitUntilDone(); Console.WriteLine("Result: " + job.Tasks[0].Result); } catch (JobSchedulerException e) { Console.WriteLine("JobSchedulerException: " + e); } } } [Serializable] public class HelloTask : Task { public override void Execute() { Result = "Hello from Task"; } } } }
STK Parallel Computing Server 2.9 API for .NET