Class Watchdog.Builder

  • All Implemented Interfaces:
    java.util.function.Supplier<Watchdog>
    Enclosing class:
    Watchdog

    public static final class Watchdog.Builder
    extends java.lang.Object
    implements java.util.function.Supplier<Watchdog>
    Builds ExecuteWatchdog instances.
    Since:
    1.4.0
    • Constructor Summary

      Constructors 
      Constructor Description
      Builder()
      Constructs a new instance.
    • Constructor Detail

      • Builder

        public Builder()
        Constructs a new instance.
    • Method Detail

      • get

        public Watchdog get()
        Creates a new configured ExecuteWatchdog.
        Specified by:
        get in interface java.util.function.Supplier<Watchdog>
        Returns:
        a new configured ExecuteWatchdog.
      • setThreadFactory

        public Watchdog.Builder setThreadFactory​(java.util.concurrent.ThreadFactory threadFactory)
        Sets the thread factory.
        Parameters:
        threadFactory - the thread factory, null resets to the default Executors.defaultThreadFactory().
        Returns:
        this instance.
      • setTimeout

        public Watchdog.Builder setTimeout​(java.time.Duration timeout)
        Sets the timeout duration.
        Parameters:
        timeout - the timeout duration, null resets to the default 30 seconds timeout.
        Returns:
        this instance.