Package com.yahoo.messagebus.network.rpc
Class RPCNetworkParams
java.lang.Object
com.yahoo.messagebus.network.rpc.RPCNetworkParams
To facilitate several configuration parameters to the
RPCNetwork
constructor, all parameters are held by this
class. This class has reasonable default values for each parameter.- Author:
- Simon Thoresen Hult
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionConstructs a new instance of this class with reasonable default values.RPCNetworkParams
(RPCNetworkParams params) Implements the copy constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the number of seconds before an idle network connection expires.Returns the identity to use for the network.int
Returns the port to listen to.int
Returns the maximum input buffer size allowed for the underlying FNET connection.Returns the config id of the slobrok config.com.yahoo.cloud.config.SlobroksConfig
Returns the 'slobroks' config, if set, otherwise null.int
setConnectionExpireSecs
(double secs) Sets the number of seconds before an idle network connection expires.setIdentity
(Identity identity) Sets the identity to use for the network.setListenPort
(int listenPort) Sets the port to listen to.setNumNetworkThreads
(int numNetworkThreads) setNumTargetsPerSpec
(int numTargetsPerSpec) setOptimization
(RPCNetworkParams.Optimization optimization) setSlobrokConfigId
(String slobrokConfigId) Sets the config id of the slobrok config.setSlobroksConfig
(com.yahoo.cloud.config.SlobroksConfig slobroksConfig) Sets the 'slobroks' config object.setTransportEventsBeforeWakeup
(int transportEventsBeforeWakeup)
-
Constructor Details
-
RPCNetworkParams
public RPCNetworkParams()Constructs a new instance of this class with reasonable default values. -
RPCNetworkParams
Implements the copy constructor.- Parameters:
params
- The object to copy.
-
-
Method Details
-
getIdentity
Returns the identity to use for the network.- Returns:
- The identity.
-
setIdentity
Sets the identity to use for the network.- Parameters:
identity
- The new identity.- Returns:
- This, to allow chaining.
-
getSlobrokConfigId
Returns the config id of the slobrok config.- Returns:
- The config id.
-
setSlobrokConfigId
Sets the config id of the slobrok config. Setting this to null string will revert to the default slobrok config identifier.- Parameters:
slobrokConfigId
- The new config id.- Returns:
- This, to allow chaining.
-
getSlobroksConfig
public com.yahoo.cloud.config.SlobroksConfig getSlobroksConfig()Returns the 'slobroks' config, if set, otherwise null.- Returns:
- The 'slobroks' config, if set, otherwise null.
-
setSlobroksConfig
Sets the 'slobroks' config object. Setting this to null will revert to self-subscribing usinggetSlobrokConfigId()
.- Parameters:
slobroksConfig
- the new slobroks config to use, or null.- Returns:
- This, to allow chaining.
-
getListenPort
public int getListenPort()Returns the port to listen to.- Returns:
- The port.
-
setListenPort
Sets the port to listen to.- Parameters:
listenPort
- The new port.- Returns:
- This, to allow chaining.
-
getConnectionExpireSecs
public double getConnectionExpireSecs()Returns the number of seconds before an idle network connection expires.- Returns:
- The number of seconds.
-
setConnectionExpireSecs
Sets the number of seconds before an idle network connection expires.- Parameters:
secs
- The number of seconds.- Returns:
- This, to allow chaining.
-
setNumTargetsPerSpec
-
setNumNetworkThreads
-
setOptimization
-
getMaxInputBufferSize
public int getMaxInputBufferSize()Returns the maximum input buffer size allowed for the underlying FNET connection.- Returns:
- The maximum number of bytes.
-
getTransportEventsBeforeWakeup
public int getTransportEventsBeforeWakeup() -
setTransportEventsBeforeWakeup
-