Package io.ipinfo.api

Class IPinfo.BatchReqOpts.Builder

java.lang.Object
io.ipinfo.api.IPinfo.BatchReqOpts.Builder
Enclosing class:
IPinfo.BatchReqOpts

public static class IPinfo.BatchReqOpts.Builder
extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • setBatchSize

      public IPinfo.BatchReqOpts.Builder setBatchSize​(int batchSize)
      batchSize is the internal batch size used per API request; the IPinfo API has a maximum batch size, but the batch request functions available in this library do not. Therefore the library chunks the input slices internally into chunks of size `batchSize`, clipping to the maximum allowed by the IPinfo API. 0 means to use the default batch size which is the max allowed by the IPinfo API.
      Parameters:
      batchSize - see description.
      Returns:
      the builder.
    • setTimeoutPerBatch

      public IPinfo.BatchReqOpts.Builder setTimeoutPerBatch​(int timeoutPerBatch)
      timeoutPerBatch is the timeout in seconds that each batch of size `BatchSize` will have for its own request. 0 means to use a default of 5 seconds; any negative number will turn it off; turning it off does _not_ disable the effects of `timeoutTotal`.
      Parameters:
      timeoutPerBatch - see description.
      Returns:
      the builder.
    • setTimeoutTotal

      public IPinfo.BatchReqOpts.Builder setTimeoutTotal​(int timeoutTotal)
      timeoutTotal is the total timeout in seconds for all batch requests in a batch request function to complete. 0 means no total timeout; `timeoutPerBatch` will still apply.
      Parameters:
      timeoutTotal - see description.
      Returns:
      the builder.
    • setFilter

      public IPinfo.BatchReqOpts.Builder setFilter​(boolean filter)
      filter, if turned on, will filter out a URL whose value was deemed empty on the server.
      Parameters:
      filter - see description.
      Returns:
      the builder.
    • build

      public IPinfo.BatchReqOpts build()