AffinityInformation Class

  • java.lang.Object
    • com.microsoft.azure.batch.protocol.models.AffinityInformation

public class AffinityInformation

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
AffinityInformation()

Method Summary

Modifier and Type Method and Description
String affinityId()

Get you can pass the affinityId of a Node to indicate that this Task needs to run on that Compute Node.

AffinityInformation withAffinityId(String affinityId)

Set you can pass the affinityId of a Node to indicate that this Task needs to run on that Compute Node.

Methods inherited from java.lang.Object

Constructor Details

AffinityInformation

public AffinityInformation()

Method Details

affinityId

public String affinityId()

Get 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:

the affinityId value

withAffinityId

public AffinityInformation withAffinityId(String affinityId)

Set 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.

Parameters:

affinityId - the affinityId value to set

Returns:

the AffinityInformation object itself.

Applies to