Class Batch.BatchBuilder

  • Enclosing class:
    Batch

    public static class Batch.BatchBuilder
    extends java.lang.Object
    Helper class for building a Batch.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String batch  
      private java.util.Optional<java.lang.Double> delay  
      private java.util.Optional<java.lang.Integer> presencePingGatherJobTimeout  
      private java.util.Optional<java.lang.Integer> presencePingTimeout  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private BatchBuilder()
      Constructor for BatchBuilder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Batch build()
      Returns a Batch with the values of this BatchBuilder instance.
      Batch.BatchBuilder withBatchAsAmount​(int value)
      Sets the batch value representing an exact amount of items
      Batch.BatchBuilder withBatchAsPercent​(int value)
      Sets the batch value representing a percent
      Batch.BatchBuilder withDelay​(java.lang.Double delayIn)
      Batch delay specifies the time for salt to wait for more minions to return a result before scheduling the next batch.
      Batch.BatchBuilder withPresencePingGatherJobTimeout​(java.lang.Integer presencePingGatherJobTimeoutIn)
      Batch presence ping gather job timeout specifies the timeout in seconds for gathering the presence ping jobs performed in salt minions to determine which minions are available during salt batch synchronous calls.
      Batch.BatchBuilder withPresencePingTimeout​(java.lang.Integer presencePingTimeoutIn)
      Batch presence ping timeout specifies the timeout in seconds of the presence ping performed in salt minions to determine which minions are available during salt batch calls.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • batch

        private java.lang.String batch
      • delay

        private java.util.Optional<java.lang.Double> delay
      • presencePingTimeout

        private java.util.Optional<java.lang.Integer> presencePingTimeout
      • presencePingGatherJobTimeout

        private java.util.Optional<java.lang.Integer> presencePingGatherJobTimeout
    • Constructor Detail

      • BatchBuilder

        private BatchBuilder()
        Constructor for BatchBuilder.
    • Method Detail

      • withBatchAsAmount

        public Batch.BatchBuilder withBatchAsAmount​(int value)
        Sets the batch value representing an exact amount of items
        Parameters:
        value - the exact amount of items, which must be greater than 0
        Returns:
        the Batch
      • withBatchAsPercent

        public Batch.BatchBuilder withBatchAsPercent​(int value)
        Sets the batch value representing a percent
        Parameters:
        value - the percent, which must be greater than 0 and less than or equal to 100
        Returns:
        the Batch
      • withDelay

        public Batch.BatchBuilder withDelay​(java.lang.Double delayIn)
        Batch delay specifies the time for salt to wait for more minions to return a result before scheduling the next batch. This helps to avoid single minion batches.
        Parameters:
        delayIn - time to wait in seconds.
        Returns:
        this BatchBuilder instance with the specified batch delay.
      • withPresencePingTimeout

        public Batch.BatchBuilder withPresencePingTimeout​(java.lang.Integer presencePingTimeoutIn)
        Batch presence ping timeout specifies the timeout in seconds of the presence ping performed in salt minions to determine which minions are available during salt batch calls.
        Parameters:
        presencePingTimeoutIn - time to wait in seconds.
        Returns:
        this BatchBuilder instance with the specified batch presence ping timeout.
      • withPresencePingGatherJobTimeout

        public Batch.BatchBuilder withPresencePingGatherJobTimeout​(java.lang.Integer presencePingGatherJobTimeoutIn)
        Batch presence ping gather job timeout specifies the timeout in seconds for gathering the presence ping jobs performed in salt minions to determine which minions are available during salt batch synchronous calls.
        Parameters:
        presencePingGatherJobTimeoutIn - time to wait in seconds.
        Returns:
        this BatchBuilder instance with the specified batch presence ping gather job timeout.
      • build

        public Batch build()
        Returns a Batch with the values of this BatchBuilder instance.
        Returns:
        a new Batch