All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mindee.AsyncPollingOptions Maven / Gradle / Ivy

There is a newer version: 4.21.0
Show newest version
package com.mindee;

import lombok.Builder;
import lombok.Value;

/**
 * Options to pass for asynchronous parsing with polling.
 */
@Value
public class AsyncPollingOptions {
  /**
   * Wait this many seconds before the first polling attempt.
   */
  Double initialDelaySec;
  /**
   * Wait this many seconds between each polling attempt.
   */
  Double intervalSec;
  /**
   * Maximum number of times to poll.
   */
  Integer maxRetries;

  @Builder
  private AsyncPollingOptions(
      Double initialDelaySec,
      Double intervalSec,
      Integer maxRetries
  ) {
    this.initialDelaySec = initialDelaySec == null ? 4.0 : initialDelaySec;
    this.intervalSec = intervalSec == null ? 2.0 : intervalSec;
    this.maxRetries = maxRetries == null ? 30 : maxRetries;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy