Class FederationOptions
java.lang.Object
com.yahoo.search.searchchain.model.federation.FederationOptions
- All Implemented Interfaces:
Cloneable
Options for controlling federation to a single source.
This is a value object.
- Author:
- Tony Vaagenes
-
Constructor Summary
ConstructorDescriptionCreates a set of default options: Mandatory, no timeout restriction and not used by defaultFederationOptions
(Boolean optional, Integer timeoutInMilliseconds, Boolean useByDefault) Creates a request with no separate requestTimeoutInMillisecondsFederationOptions
(Boolean optional, Integer timeoutInMilliseconds, Integer requestTimeoutInMilliseconds, Boolean useByDefault) Creates a fully specified set of options -
Method Summary
Modifier and TypeMethodDescriptionboolean
equals
(FederationOptions other) boolean
boolean
int
Returns the amount of time we should allow this target execution to run, or -1 to use defaultlong
getSearchChainExecutionTimeoutInMilliseconds
(long queryTimeout) int
Returns the amount of time we should wait for this target, or -1 to use defaultboolean
int
hashCode()
inherit
(FederationOptions parent) setOptional
(Boolean newOptional) Returns a set of options which are the same of this but with optional set to the given valuesetRequestTimeoutInMilliseconds
(Integer newRequestTimeoutInMilliseconds) Returns a set of options which are the same of this but with request timeout set to the given valuesetTimeoutInMilliseconds
(Integer newTimeoutInMilliseconds) Returns a set of options which are the same of this but with timeout set to the given valuesetUseByDefault
(Boolean newUseByDefault) Returns a set of options which are the same of this but with default set to the given valuetoString()
-
Constructor Details
-
FederationOptions
Creates a request with no separate requestTimeoutInMilliseconds -
FederationOptions
public FederationOptions(Boolean optional, Integer timeoutInMilliseconds, Integer requestTimeoutInMilliseconds, Boolean useByDefault) Creates a fully specified set of options- Parameters:
optional
- whether this should be optionaltimeoutInMilliseconds
- the max time to wait for a result from this source, or null to use the timeout of the queryrequestTimeoutInMilliseconds
- 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 default
-
FederationOptions
public FederationOptions()Creates a set of default options: Mandatory, no timeout restriction and not used by default
-
-
Method Details
-
setOptional
Returns a set of options which are the same of this but with optional set to the given value -
setTimeoutInMilliseconds
Returns a set of options which are the same of this but with timeout set to the given value -
setRequestTimeoutInMilliseconds
Returns a set of options which are the same of this but with request timeout set to the given value -
setUseByDefault
Returns a set of options which are the same of this but with default set to the given value -
getOptional
public boolean getOptional() -
getTimeoutInMilliseconds
public int getTimeoutInMilliseconds()Returns the amount of time we should wait for this target, or -1 to use default -
getRequestTimeoutInMilliseconds
public int getRequestTimeoutInMilliseconds()Returns the amount of time we should allow this target execution to run, or -1 to use default -
getSearchChainExecutionTimeoutInMilliseconds
public long getSearchChainExecutionTimeoutInMilliseconds(long queryTimeout) -
getUseByDefault
public boolean getUseByDefault() -
inherit
-
equals
-
equals
-
hashCode
public int hashCode() -
toString
-