Package com.yahoo.documentapi.messagebus
Class MessageBusParams
- java.lang.Object
-
- com.yahoo.documentapi.DocumentAccessParams
-
- com.yahoo.documentapi.messagebus.MessageBusParams
-
public class MessageBusParams extends DocumentAccessParams
- Author:
- Einar M R Rosenvinge
-
-
Constructor Summary
Constructors Constructor Description MessageBusParams()
MessageBusParams(LoadTypeSet loadTypes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LoadTypeSet
getLoadTypes()
com.yahoo.messagebus.MessageBusParams
getMessageBusParams()
Returns the params object used to instantiate the message bus.String
getProtocolConfigId()
Returns the id to resolve to protocol config.String
getRoute()
Returns the route string that all requests will be sent to.String
getRouteForGet()
String
getRoutingConfigId()
Returns the id to resolve to routing config.com.yahoo.messagebus.network.rpc.RPCNetworkParams
getRPCNetworkParams()
Returns the params object used to instantiate the rpc network layer for message bus.com.yahoo.messagebus.SourceSessionParams
getSourceSessionParams()
Returns a reference to the extended source session params object.int
getTraceLevel()
Returns the trace level to use when sending.MessageBusParams
setDocumentProtocolPoliciesConfig(DocumentProtocolPoliciesConfig policiesConfig, com.yahoo.vespa.config.content.DistributionConfig distributionConfig)
Sets the config used by theDocumentProtocol
policies.MessageBusParams
setMessageBusParams(com.yahoo.messagebus.MessageBusParams params)
Sets the params object used to instantiate the message bus.MessageBusParams
setProtocolConfigId(String configId)
Sets the id to resolve to protocol config.MessageBusParams
setRoute(String route)
Sets the route string to send all requests to.MessageBusParams
setRouteForGet(String route)
MessageBusParams
setRouteName(String routeName)
Sets the name of the route to send appropriate requests to.MessageBusParams
setRouteNameForGet(String routeName)
MessageBusParams
setRoutingConfigId(String configId)
Sets the id to resolve to routing config.MessageBusParams
setRPCNetworkParams(com.yahoo.messagebus.network.rpc.RPCNetworkParams params)
Sets the params object used to instantiate the rpc network layer for message bus.MessageBusParams
setSourceSessionParams(com.yahoo.messagebus.SourceSessionParams params)
Sets the extended source session params.MessageBusParams
setTraceLevel(int traceLevel)
Sets the trace level to use when sending.-
Methods inherited from class com.yahoo.documentapi.DocumentAccessParams
documentmanagerConfig, getDocumentManagerConfigId, setDocumentmanagerConfig, setDocumentManagerConfigId
-
-
-
-
Constructor Detail
-
MessageBusParams
public MessageBusParams()
-
MessageBusParams
public MessageBusParams(LoadTypeSet loadTypes)
-
-
Method Detail
-
getLoadTypes
public LoadTypeSet getLoadTypes()
- Returns:
- Returns the set of load types accepted by this Vespa installation
-
getRoutingConfigId
public String getRoutingConfigId()
Returns the id to resolve to routing config.- Returns:
- The config id.
-
setRoutingConfigId
public MessageBusParams setRoutingConfigId(String configId)
Sets the id to resolve to routing config. This has a proper default value that holds for Vespa applications, and can therefore be left unset.- Parameters:
configId
- The config id.- Returns:
- This object for chaining.
-
getProtocolConfigId
public String getProtocolConfigId()
Returns the id to resolve to protocol config.- Returns:
- The config id.
-
setProtocolConfigId
public MessageBusParams setProtocolConfigId(String configId)
Sets the id to resolve to protocol config. This has a proper default value that holds for Vespa applications, and can therefore be left usnet.- Parameters:
configId
- The config id.- Returns:
- This, to allow chaining.
-
setDocumentProtocolPoliciesConfig
public MessageBusParams setDocumentProtocolPoliciesConfig(DocumentProtocolPoliciesConfig policiesConfig, com.yahoo.vespa.config.content.DistributionConfig distributionConfig)
Sets the config used by theDocumentProtocol
policies.
-
setRouteName
public MessageBusParams setRouteName(String routeName)
Sets the name of the route to send appropriate requests to. This is a convenience method for prefixing a route with "route:", and usingsetRoute(java.lang.String)
instead.- Parameters:
routeName
- The route name.- Returns:
- This object for chaining.
-
setRoute
public MessageBusParams setRoute(String route)
Sets the route string to send all requests to. This string will be parsed as a route string, so setting a route name directly will not necessarily have the intended consequences. Use "route:<routename>" syntax for route names, or the convenience methodsetRouteName(java.lang.String)
for this.- Parameters:
route
- The route string.- Returns:
- This object for chaining.
-
setRouteNameForGet
public MessageBusParams setRouteNameForGet(String routeName)
-
setRouteForGet
public MessageBusParams setRouteForGet(String route)
-
getRoute
public String getRoute()
Returns the route string that all requests will be sent to.- Returns:
- The route string.
-
getRouteForGet
public String getRouteForGet()
-
getTraceLevel
public int getTraceLevel()
Returns the trace level to use when sending.- Returns:
- The trace level.
-
setTraceLevel
public MessageBusParams setTraceLevel(int traceLevel)
Sets the trace level to use when sending.- Parameters:
traceLevel
- The trace level.- Returns:
- This object for chaining.
-
getRPCNetworkParams
public com.yahoo.messagebus.network.rpc.RPCNetworkParams getRPCNetworkParams()
Returns the params object used to instantiate the rpc network layer for message bus.- Returns:
- The params object.
-
setRPCNetworkParams
public MessageBusParams setRPCNetworkParams(com.yahoo.messagebus.network.rpc.RPCNetworkParams params)
Sets the params object used to instantiate the rpc network layer for message bus.- Parameters:
params
- The params object.- Returns:
- This object for chaining.
-
getMessageBusParams
public com.yahoo.messagebus.MessageBusParams getMessageBusParams()
Returns the params object used to instantiate the message bus.- Returns:
- The params object.
-
setMessageBusParams
public MessageBusParams setMessageBusParams(com.yahoo.messagebus.MessageBusParams params)
Sets the params object used to instantiate the message bus.- Parameters:
params
- The params object.- Returns:
- This object for chaining.
-
getSourceSessionParams
public com.yahoo.messagebus.SourceSessionParams getSourceSessionParams()
Returns a reference to the extended source session params object.- Returns:
- The params object.
-
setSourceSessionParams
public MessageBusParams setSourceSessionParams(com.yahoo.messagebus.SourceSessionParams params)
Sets the extended source session params.- Parameters:
params
- The params object.- Returns:
- This object for chaining.
-
-