Modifier and Type | Field and Description |
---|---|
private Boolean |
optional |
private Integer |
requestTimeoutInMilliseconds |
private Integer |
timeoutInMilliseconds |
private Boolean |
useByDefault |
Constructor and Description |
---|
FederationOptions()
Creates a set of default options: Mandatory, no timeout restriction and not used by default
|
FederationOptions(Boolean optional,
Integer timeoutInMilliseconds,
Boolean useByDefault)
Creates a request with no separate requestTimeoutInMilliseconds
|
FederationOptions(Boolean optional,
Integer timeoutInMilliseconds,
Integer requestTimeoutInMilliseconds,
Boolean useByDefault)
Creates a fully specified set of options
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(FederationOptions other) |
boolean |
equals(Object other) |
boolean |
getOptional() |
int |
getRequestTimeoutInMilliseconds()
Returns the amount of time we should allow this target execution to run, or -1 to use default
|
long |
getSearchChainExecutionTimeoutInMilliseconds(long queryTimeout) |
int |
getTimeoutInMilliseconds()
Returns the amount of time we should wait for this target, or -1 to use default
|
boolean |
getUseByDefault() |
int |
hashCode() |
FederationOptions |
inherit(FederationOptions parent) |
private static <T> T |
inherit(T child,
T parent) |
FederationOptions |
setOptional(Boolean newOptional)
Returns a set of options which are the same of this but with optional set to the given value
|
FederationOptions |
setRequestTimeoutInMilliseconds(Integer newRequestTimeoutInMilliseconds)
Returns a set of options which are the same of this but with request timeout set to the given value
|
FederationOptions |
setTimeoutInMilliseconds(Integer newTimeoutInMilliseconds)
Returns a set of options which are the same of this but with timeout set to the given value
|
FederationOptions |
setUseByDefault(Boolean newUseByDefault)
Returns a set of options which are the same of this but with default set to the given value
|
String |
toString() |
private final Boolean optional
private final Integer timeoutInMilliseconds
private final Integer requestTimeoutInMilliseconds
private final Boolean useByDefault
public FederationOptions(Boolean optional, Integer timeoutInMilliseconds, Boolean useByDefault)
public FederationOptions(Boolean optional, Integer timeoutInMilliseconds, Integer requestTimeoutInMilliseconds, Boolean useByDefault)
optional
- whether this should be optionaltimeoutInMilliseconds
- the max time to wait for a result from this source, or null to not specify a limitrequestTimeoutInMilliseconds
- the max time to allow this request to live, or null to make this the same as
timeoutInMilliseconds. Setting this higher than timeoutInMilliseconds is
useful to use queries to populate the cache of slow sourcesuseByDefault
- whether this should be invoked by defaultpublic FederationOptions()
public FederationOptions setOptional(Boolean newOptional)
public FederationOptions setTimeoutInMilliseconds(Integer newTimeoutInMilliseconds)
public FederationOptions setRequestTimeoutInMilliseconds(Integer newRequestTimeoutInMilliseconds)
public FederationOptions setUseByDefault(Boolean newUseByDefault)
public boolean getOptional()
public int getTimeoutInMilliseconds()
public int getRequestTimeoutInMilliseconds()
public long getSearchChainExecutionTimeoutInMilliseconds(long queryTimeout)
public boolean getUseByDefault()
public FederationOptions inherit(FederationOptions parent)
private static <T> T inherit(T child, T parent)
public boolean equals(FederationOptions other)
Copyright © 2017. All rights reserved.