public class CallOptionsConfig extends Object implements Serializable
CallOptions
supports other settings as
well, which this configuration object could help set.Modifier and Type | Class and Description |
---|---|
static class |
CallOptionsConfig.Builder |
Modifier and Type | Field and Description |
---|---|
static int |
LONG_TIMEOUT_MS_DEFAULT
The default duration to wait before timing out RPCs.
|
static int |
SHORT_TIMEOUT_MS_DEFAULT
The default duration to wait before timing out RPCs.
|
static boolean |
USE_TIMEOUT_DEFAULT
Constant
USE_TIMEOUT_DEFAULT=false |
Constructor and Description |
---|
CallOptionsConfig(boolean useTimeout,
int unaryRpcTimeoutMs,
int longRpcTimeoutMs)
Constructor for CallOptionsConfig.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
getLongRpcTimeoutMs()
Getter for the field
longRpcTimeoutMs . |
int |
getShortRpcTimeoutMs()
Getter for the field
shortRpcTimeoutMs . |
int |
getTimeoutMs()
Deprecated.
|
boolean |
isUseTimeout()
isUseTimeout.
|
CallOptionsConfig.Builder |
toBuilder()
toBuilder.
|
String |
toString() |
public static final boolean USE_TIMEOUT_DEFAULT
USE_TIMEOUT_DEFAULT=false
public static final int SHORT_TIMEOUT_MS_DEFAULT
public static final int LONG_TIMEOUT_MS_DEFAULT
public CallOptionsConfig(boolean useTimeout, int unaryRpcTimeoutMs, int longRpcTimeoutMs)
Constructor for CallOptionsConfig.
useTimeout
- a boolean.unaryRpcTimeoutMs
- an int.longRpcTimeoutMs
- an int.public boolean isUseTimeout()
isUseTimeout.
@Deprecated public int getTimeoutMs()
Getter for the field shortRpcTimeoutMs
. Use getShortRpcTimeoutMs()
instead.
public int getShortRpcTimeoutMs()
Getter for the field shortRpcTimeoutMs
.
public int getLongRpcTimeoutMs()
Getter for the field longRpcTimeoutMs
.
public CallOptionsConfig.Builder toBuilder()
toBuilder.
CallOptionsConfig.Builder
object.