Class Batch

  • public class Batch
    extends Object
    A class representing the batch parameter. Salt uses a string for the batch parameter, but it accept strings representing both exact numerals and percents, so this class encapsulates the creation and usage of the batch strings, adding safety.
    • Method Detail

      • getBatch

        public String getBatch()
      • getPresencePingTimeout

        public Optional<Integer> getPresencePingTimeout()
      • getPresencePingGatherJobTimeout

        public Optional<Integer> getPresencePingGatherJobTimeout()
      • asPercent

        public static Batch asPercent​(int value)
        Construct a Batch from a value representing a percent
        value - the percent, which must be greater than 0 and less than or equal to 100
        the Batch
      • asAmount

        public static Batch asAmount​(int value)
        Construct a Batch from a value representing an exact amount of items
        value - the exact amount of items, which must be greater than 0
        the Batch
      • custom

        public static Batch.BatchBuilder custom()
        Returns a BatchBuilder for instantiating a custom Batch.
        a BatchBuilder instance.