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 Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description IPinfo.BatchReqOpts
build()
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.IPinfo.BatchReqOpts.Builder
setFilter(boolean filter)
filter, if turned on, will filter out a URL whose value was deemed empty on the server.IPinfo.BatchReqOpts.Builder
setTimeoutPerBatch(int timeoutPerBatch)
timeoutPerBatch is the timeout in seconds that each batch of size `BatchSize` will have for its own request.IPinfo.BatchReqOpts.Builder
setTimeoutTotal(int timeoutTotal)
timeoutTotal is the total timeout in seconds for all batch requests in a batch request function to complete.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setBatchSize
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
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
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
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
-