Enum ApiRateLimitChecker

java.lang.Object
java.lang.Enum<ApiRateLimitChecker>
org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker
All Implemented Interfaces:
Serializable, Comparable<ApiRateLimitChecker>

public enum ApiRateLimitChecker extends Enum<ApiRateLimitChecker>
  • Enum Constant Details

    • ThrottleForNormalize

      public static final ApiRateLimitChecker ThrottleForNormalize
      Attempt to evenly distribute GitHub API requests.
    • ThrottleOnOver

      public static final ApiRateLimitChecker ThrottleOnOver
      Restrict GitHub API requests only when near or above rate limit.
    • NoThrottle

      public static final ApiRateLimitChecker NoThrottle
      Ignore GitHub API Rate limit. Useful for GitHub Enterprise instances that might not have a limit set up.
  • Method Details

    • values

      public static ApiRateLimitChecker[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ApiRateLimitChecker valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getDisplayName

      public String getDisplayName()
    • configureThreadLocalChecker

      public static void configureThreadLocalChecker(@NonNull TaskListener listener, @NonNull org.kohsuke.github.GitHub gitHub)
    • checkApiRateLimit

      @Deprecated public void checkApiRateLimit(TaskListener listener, org.kohsuke.github.GitHub gitHub) throws IOException, InterruptedException
      Deprecated.
      rate limit checking is done automatically. Use configureThreadLocalChecker(TaskListener, GitHub) instead.
      This method is the old code path for rate limit checks

      It has been slowly refactored until it almost matches the behavior of the GitHubRateLimitChecker.

      Throws:
      IOException
      InterruptedException
    • getChecker

      public abstract org.jenkinsci.plugins.github_branch_source.ApiRateLimitChecker.LocalChecker getChecker(@NonNull TaskListener listener, String apiUrl)