Constructor and Description |
---|
AsyncConfig()
Creates a default
AsyncConfig with timeout equal 1000 milliseconds (1 second). |
AsyncConfig(long timeoutInMs)
Creates a new
AsyncConfig with timeout equal to the given number of milliseconds. |
AsyncConfig(long duration,
TimeUnit timeUnit)
Creates a new
AsyncConfig with timeout. |
Modifier and Type | Method and Description |
---|---|
static AsyncConfig |
asyncConfig()
Just syntactic sugar.
|
boolean |
isUserConfigured() |
AsyncConfig |
timeout(long timeoutInMs)
Specify the timeout for the async request in milliseconds.
|
AsyncConfig |
timeout(long duration,
TimeUnit timeUnit)
Specify the timeout for the async request in milliseconds.
|
long |
timeoutInMs() |
AsyncConfig |
with()
Just syntactic sugar to make the DSL more english like.
|
static AsyncConfig |
withTimeout(long duration,
TimeUnit timeUnit) |
public AsyncConfig()
AsyncConfig
with timeout equal 1000 milliseconds (1 second).public AsyncConfig(long timeoutInMs)
AsyncConfig
with timeout equal to the given number of milliseconds.timeoutInMs
- The timeunit in milliseconds.public AsyncConfig(long duration, TimeUnit timeUnit)
AsyncConfig
with timeout.duration
- The durationtimeUnit
- The time unitpublic AsyncConfig timeout(long timeoutInMs)
timeoutInMs
- The timeout in milliseconds.public AsyncConfig timeout(long duration, TimeUnit timeUnit)
duration
- The duration.timeUnit
- The time unit for the duration.public long timeoutInMs()
public boolean isUserConfigured()
isUserConfigured
in interface Config
public static AsyncConfig withTimeout(long duration, TimeUnit timeUnit)
public AsyncConfig with()
public static AsyncConfig asyncConfig()
AsyncConfig
.Copyright © 2010–2017. All rights reserved.