Class BatchProcess

    • Method Detail

      • setPauseOnEarlyTerminationMillis

        public void setPauseOnEarlyTerminationMillis​(long pauseOnEarlyTerminationMillis)
        If there is an early termination via an interrupt or too many timed out consumers or because a consumer or other Runnable threw a Throwable, pause this long before interrupting the consumers and other threads.

        Typically makes sense for this to be the same or slightly larger than timeoutThresholdMillis

        Parameters:
        pauseOnEarlyTerminationMillis - how long to pause if there is an early termination
      • setTimeoutThresholdMillis

        public void setTimeoutThresholdMillis​(long timeoutThresholdMillis)
        The amount of time allowed before a consumer should be timed out.
        Parameters:
        timeoutThresholdMillis - threshold in milliseconds before declaring a consumer timed out
      • setTimeoutCheckPulseMillis

        public void setTimeoutCheckPulseMillis​(long timeoutCheckPulseMillis)
      • setMaxAliveTimeSeconds

        public void setMaxAliveTimeSeconds​(int maxAliveTimeSeconds)
        The maximum amount of time that this process can be alive. To avoid memory leaks, it is sometimes beneficial to shutdown (and restart) the process periodically.

        If the value is < 0, the process will run until completion, interruption or exception.

        Parameters:
        maxAliveTimeSeconds - maximum amount of time in seconds to remain alive