Class RpcOptions.RPCOptions.Builder

All Implemented Interfaces:
Message.Builder, MessageLite.Builder, MessageLiteOrBuilder, MessageOrBuilder, Cloneable, RpcOptions.RPCOptionsOrBuilder
Enclosing class:
RpcOptions.RPCOptions

public static final class RpcOptions.RPCOptions.Builder extends GeneratedMessage.Builder<RpcOptions.RPCOptions.Builder> implements RpcOptions.RPCOptionsOrBuilder
RPC options for distributed runtime.
Protobuf type tensorflow.RPCOptions
  • Method Details

    • getDescriptor

      public static final Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

    • clear

      Specified by:
      clear in interface Message.Builder
      Specified by:
      clear in interface MessageLite.Builder
      Overrides:
      clear in class GeneratedMessage.Builder<RpcOptions.RPCOptions.Builder>
    • getDescriptorForType

      public Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface Message.Builder
      Specified by:
      getDescriptorForType in interface MessageOrBuilder
      Overrides:
      getDescriptorForType in class GeneratedMessage.Builder<RpcOptions.RPCOptions.Builder>
    • getDefaultInstanceForType

      public RpcOptions.RPCOptions getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface MessageOrBuilder
    • build

      public RpcOptions.RPCOptions build()
      Specified by:
      build in interface Message.Builder
      Specified by:
      build in interface MessageLite.Builder
    • buildPartial

      public RpcOptions.RPCOptions buildPartial()
      Specified by:
      buildPartial in interface Message.Builder
      Specified by:
      buildPartial in interface MessageLite.Builder
    • mergeFrom

      public RpcOptions.RPCOptions.Builder mergeFrom(Message other)
      Specified by:
      mergeFrom in interface Message.Builder
      Overrides:
      mergeFrom in class AbstractMessage.Builder<RpcOptions.RPCOptions.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface MessageLiteOrBuilder
      Overrides:
      isInitialized in class GeneratedMessage.Builder<RpcOptions.RPCOptions.Builder>
    • mergeFrom

      public RpcOptions.RPCOptions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface Message.Builder
      Specified by:
      mergeFrom in interface MessageLite.Builder
      Overrides:
      mergeFrom in class AbstractMessage.Builder<RpcOptions.RPCOptions.Builder>
      Throws:
      IOException
    • getUseRpcForInprocessMaster

      public boolean getUseRpcForInprocessMaster()
      If true, always use RPC to contact the session target.
      
      If false (the default option), TensorFlow may use an optimized
      transport for client-master communication that avoids the RPC
      stack. This option is primarily for used testing the RPC stack.
      
      bool use_rpc_for_inprocess_master = 1;
      Specified by:
      getUseRpcForInprocessMaster in interface RpcOptions.RPCOptionsOrBuilder
      Returns:
      The useRpcForInprocessMaster.
    • setUseRpcForInprocessMaster

      public RpcOptions.RPCOptions.Builder setUseRpcForInprocessMaster(boolean value)
      If true, always use RPC to contact the session target.
      
      If false (the default option), TensorFlow may use an optimized
      transport for client-master communication that avoids the RPC
      stack. This option is primarily for used testing the RPC stack.
      
      bool use_rpc_for_inprocess_master = 1;
      Parameters:
      value - The useRpcForInprocessMaster to set.
      Returns:
      This builder for chaining.
    • clearUseRpcForInprocessMaster

      public RpcOptions.RPCOptions.Builder clearUseRpcForInprocessMaster()
      If true, always use RPC to contact the session target.
      
      If false (the default option), TensorFlow may use an optimized
      transport for client-master communication that avoids the RPC
      stack. This option is primarily for used testing the RPC stack.
      
      bool use_rpc_for_inprocess_master = 1;
      Returns:
      This builder for chaining.
    • getCompressionAlgorithm

      public String getCompressionAlgorithm()
      The compression algorithm to be used. One of "deflate", "gzip".
      
      string compression_algorithm = 2;
      Specified by:
      getCompressionAlgorithm in interface RpcOptions.RPCOptionsOrBuilder
      Returns:
      The compressionAlgorithm.
    • getCompressionAlgorithmBytes

      public ByteString getCompressionAlgorithmBytes()
      The compression algorithm to be used. One of "deflate", "gzip".
      
      string compression_algorithm = 2;
      Specified by:
      getCompressionAlgorithmBytes in interface RpcOptions.RPCOptionsOrBuilder
      Returns:
      The bytes for compressionAlgorithm.
    • setCompressionAlgorithm

      public RpcOptions.RPCOptions.Builder setCompressionAlgorithm(String value)
      The compression algorithm to be used. One of "deflate", "gzip".
      
      string compression_algorithm = 2;
      Parameters:
      value - The compressionAlgorithm to set.
      Returns:
      This builder for chaining.
    • clearCompressionAlgorithm

      public RpcOptions.RPCOptions.Builder clearCompressionAlgorithm()
      The compression algorithm to be used. One of "deflate", "gzip".
      
      string compression_algorithm = 2;
      Returns:
      This builder for chaining.
    • setCompressionAlgorithmBytes

      public RpcOptions.RPCOptions.Builder setCompressionAlgorithmBytes(ByteString value)
      The compression algorithm to be used. One of "deflate", "gzip".
      
      string compression_algorithm = 2;
      Parameters:
      value - The bytes for compressionAlgorithm to set.
      Returns:
      This builder for chaining.
    • getCompressionLevel

      public int getCompressionLevel()
      If compression_algorithm is set, the compression level to be used.
      From 0 (no compression), up to 3.
      
      int32 compression_level = 3;
      Specified by:
      getCompressionLevel in interface RpcOptions.RPCOptionsOrBuilder
      Returns:
      The compressionLevel.
    • setCompressionLevel

      public RpcOptions.RPCOptions.Builder setCompressionLevel(int value)
      If compression_algorithm is set, the compression level to be used.
      From 0 (no compression), up to 3.
      
      int32 compression_level = 3;
      Parameters:
      value - The compressionLevel to set.
      Returns:
      This builder for chaining.
    • clearCompressionLevel

      public RpcOptions.RPCOptions.Builder clearCompressionLevel()
      If compression_algorithm is set, the compression level to be used.
      From 0 (no compression), up to 3.
      
      int32 compression_level = 3;
      Returns:
      This builder for chaining.
    • getCacheRpcResponse

      public boolean getCacheRpcResponse()
      Setting cache_rpc_response to true will enable sender side caching of
      response for RecvTensorAsync and RecvBufAsync to allow receiver to retry
      requests . This is only necessary when the network fabric is experiencing a
      significant error rate.  Without it we'll fail a step on an network error,
      while with it we'll be able to complete long steps (like complex
      initializations) in the face of some network errors during RecvTensor.
      
      bool cache_rpc_response = 4;
      Specified by:
      getCacheRpcResponse in interface RpcOptions.RPCOptionsOrBuilder
      Returns:
      The cacheRpcResponse.
    • setCacheRpcResponse

      public RpcOptions.RPCOptions.Builder setCacheRpcResponse(boolean value)
      Setting cache_rpc_response to true will enable sender side caching of
      response for RecvTensorAsync and RecvBufAsync to allow receiver to retry
      requests . This is only necessary when the network fabric is experiencing a
      significant error rate.  Without it we'll fail a step on an network error,
      while with it we'll be able to complete long steps (like complex
      initializations) in the face of some network errors during RecvTensor.
      
      bool cache_rpc_response = 4;
      Parameters:
      value - The cacheRpcResponse to set.
      Returns:
      This builder for chaining.
    • clearCacheRpcResponse

      public RpcOptions.RPCOptions.Builder clearCacheRpcResponse()
      Setting cache_rpc_response to true will enable sender side caching of
      response for RecvTensorAsync and RecvBufAsync to allow receiver to retry
      requests . This is only necessary when the network fabric is experiencing a
      significant error rate.  Without it we'll fail a step on an network error,
      while with it we'll be able to complete long steps (like complex
      initializations) in the face of some network errors during RecvTensor.
      
      bool cache_rpc_response = 4;
      Returns:
      This builder for chaining.
    • getDisableSessionConnectionSharing

      public boolean getDisableSessionConnectionSharing()
      Disables TCP connection sharing when opening a new RPC channel.
      
      bool disable_session_connection_sharing = 5;
      Specified by:
      getDisableSessionConnectionSharing in interface RpcOptions.RPCOptionsOrBuilder
      Returns:
      The disableSessionConnectionSharing.
    • setDisableSessionConnectionSharing

      public RpcOptions.RPCOptions.Builder setDisableSessionConnectionSharing(boolean value)
      Disables TCP connection sharing when opening a new RPC channel.
      
      bool disable_session_connection_sharing = 5;
      Parameters:
      value - The disableSessionConnectionSharing to set.
      Returns:
      This builder for chaining.
    • clearDisableSessionConnectionSharing

      public RpcOptions.RPCOptions.Builder clearDisableSessionConnectionSharing()
      Disables TCP connection sharing when opening a new RPC channel.
      
      bool disable_session_connection_sharing = 5;
      Returns:
      This builder for chaining.
    • getNumChannelsPerTarget

      public int getNumChannelsPerTarget()
      Setting num_channels_per_target > 0 allows uses of multiple channels to
      communicate to the same target. This can be used to improve the aggregate
      throughput on high speed links (e.g 100G) where single connection is not
      sufficient to maximize link utilization. Note that a single RPC only goes
      on a single channel, this only helps in situations where there are multiple
      transfers to the same target overlapping in time.
      
      int32 num_channels_per_target = 6;
      Specified by:
      getNumChannelsPerTarget in interface RpcOptions.RPCOptionsOrBuilder
      Returns:
      The numChannelsPerTarget.
    • setNumChannelsPerTarget

      public RpcOptions.RPCOptions.Builder setNumChannelsPerTarget(int value)
      Setting num_channels_per_target > 0 allows uses of multiple channels to
      communicate to the same target. This can be used to improve the aggregate
      throughput on high speed links (e.g 100G) where single connection is not
      sufficient to maximize link utilization. Note that a single RPC only goes
      on a single channel, this only helps in situations where there are multiple
      transfers to the same target overlapping in time.
      
      int32 num_channels_per_target = 6;
      Parameters:
      value - The numChannelsPerTarget to set.
      Returns:
      This builder for chaining.
    • clearNumChannelsPerTarget

      public RpcOptions.RPCOptions.Builder clearNumChannelsPerTarget()
      Setting num_channels_per_target > 0 allows uses of multiple channels to
      communicate to the same target. This can be used to improve the aggregate
      throughput on high speed links (e.g 100G) where single connection is not
      sufficient to maximize link utilization. Note that a single RPC only goes
      on a single channel, this only helps in situations where there are multiple
      transfers to the same target overlapping in time.
      
      int32 num_channels_per_target = 6;
      Returns:
      This builder for chaining.