BatchAffinityInfo Class
- java.
lang. Object - com.
azure. compute. batch. models. BatchAffinityInfo
- com.
Implements
public final class BatchAffinityInfo
implements JsonSerializable<BatchAffinityInfo>
A locality hint that can be used by the Batch service to select a Compute Node on which to start a Task.
Constructor Summary
| Constructor | Description |
|---|---|
| BatchAffinityInfo(String affinityId) |
Creates an instance of Batch |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Batch |
fromJson(JsonReader jsonReader)
Reads an instance of Batch |
| String |
getAffinityId()
Get the affinity |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
BatchAffinityInfo
public BatchAffinityInfo(String affinityId)
Creates an instance of BatchAffinityInfo class.
Parameters:
Method Details
fromJson
public static BatchAffinityInfo fromJson(JsonReader jsonReader)
Reads an instance of BatchAffinityInfo from the JsonReader.
Parameters:
Returns:
Throws:
getAffinityId
public String getAffinityId()
Get the affinityId property: 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.
Returns: