Share via


AffinityInfo Class

Definition

A locality hint that can be used by the Batch service to select a Compute Node on which to start a Task.

public class AffinityInfo : System.ClientModel.Primitives.IJsonModel<Azure.Compute.Batch.AffinityInfo>, System.ClientModel.Primitives.IPersistableModel<Azure.Compute.Batch.AffinityInfo>
type AffinityInfo = class
    interface IJsonModel<AffinityInfo>
    interface IPersistableModel<AffinityInfo>
Public Class AffinityInfo
Implements IJsonModel(Of AffinityInfo), IPersistableModel(Of AffinityInfo)
Inheritance
AffinityInfo
Implements

Constructors

AffinityInfo(String)

Initializes a new instance of AffinityInfo.

Properties

AffinityId

An opaque string representing the location of a Compute Node or a Task that has run previously. You can pass the affinityId of a Node to indicate that this Task needs to run on that Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere.

Explicit Interface Implementations

IJsonModel<AffinityInfo>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<AffinityInfo>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<AffinityInfo>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<AffinityInfo>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<AffinityInfo>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to