Class RPCNetworkParams

java.lang.Object
com.yahoo.messagebus.network.rpc.RPCNetworkParams

public class RPCNetworkParams extends Object
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
  • Constructor Details

    • RPCNetworkParams

      public RPCNetworkParams()
      Constructs a new instance of this class with reasonable default values.
    • RPCNetworkParams

      public RPCNetworkParams(RPCNetworkParams params)
      Implements the copy constructor.
      Parameters:
      params - The object to copy.
  • Method Details

    • getIdentity

      public Identity getIdentity()
      Returns the identity to use for the network.
      Returns:
      The identity.
    • setIdentity

      public RPCNetworkParams setIdentity(Identity identity)
      Sets the identity to use for the network.
      Parameters:
      identity - The new identity.
      Returns:
      This, to allow chaining.
    • getSlobrokConfigId

      public String getSlobrokConfigId()
      Returns the config id of the slobrok config.
      Returns:
      The config id.
    • setSlobrokConfigId

      public RPCNetworkParams setSlobrokConfigId(String slobrokConfigId)
      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

      public RPCNetworkParams setSlobroksConfig(com.yahoo.cloud.config.SlobroksConfig slobroksConfig)
      Sets the 'slobroks' config object. Setting this to null will revert to self-subscribing using getSlobrokConfigId().
      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

      public RPCNetworkParams setListenPort(int listenPort)
      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

      public RPCNetworkParams setConnectionExpireSecs(double secs)
      Sets the number of seconds before an idle network connection expires.
      Parameters:
      secs - The number of seconds.
      Returns:
      This, to allow chaining.
    • setNumTargetsPerSpec

      public RPCNetworkParams setNumTargetsPerSpec(int numTargetsPerSpec)
    • setNumNetworkThreads

      public RPCNetworkParams setNumNetworkThreads(int numNetworkThreads)
    • setOptimization

      public RPCNetworkParams setOptimization(RPCNetworkParams.Optimization optimization)
    • 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

      public RPCNetworkParams setTransportEventsBeforeWakeup(int transportEventsBeforeWakeup)