Class ExecuteWatchdog.Builder

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

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

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.ThreadFactory threadFactory
      Thread factory.
      private java.time.Duration timeout
      Timeout duration.
    • Constructor Summary

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

      • threadFactory

        private java.util.concurrent.ThreadFactory threadFactory
        Thread factory.
      • timeout

        private java.time.Duration timeout
        Timeout duration.
    • Constructor Detail

      • Builder

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

      • get

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

        public ExecuteWatchdog.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.