Class AffinityInformation


  • public class AffinityInformation
    extends Object
    A locality hint that can be used by the Batch service to select a Compute Node on which to start a Task.
    • Constructor Detail

      • AffinityInformation

        public AffinityInformation()
    • Method Detail

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