Class FetchOptions

java.lang.Object
io.jenkins.plugins.restlistparam.model.FetchOptions

public final class FetchOptions extends Object
How one fetch of a parameter's entries is made: how long it may take in total, across all its pages, and whether it is forced to reach the endpoint instead of using cached responses.
  • Constructor Details

    • FetchOptions

      public FetchOptions(int timeoutSeconds, boolean forced)
      Parameters:
      timeoutSeconds - How many seconds the whole fetch may take; non-positive means the default
      forced - Whether every page request bypasses the HTTP response cache
  • Method Details

    • defaults

      public static FetchOptions defaults()
      Returns:
      A normal (not forced) fetch limited by the global fetch timeout
    • withGlobalTimeout

      public static FetchOptions withGlobalTimeout(boolean forced)
      Parameters:
      forced - Whether the fetch bypasses the HTTP response cache
      Returns:
      A fetch limited by the global fetch timeout
    • getTimeoutSeconds

      public int getTimeoutSeconds()
    • isForced

      public boolean isForced()