Class ThreadPoolOptionProto.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<ThreadPoolOptionProto.Builder>
com.google.protobuf.GeneratedMessage.Builder<ThreadPoolOptionProto.Builder>
org.tensorflow.framework.ThreadPoolOptionProto.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable, ThreadPoolOptionProtoOrBuilder
Enclosing class:
ThreadPoolOptionProto

public static final class ThreadPoolOptionProto.Builder extends com.google.protobuf.GeneratedMessage.Builder<ThreadPoolOptionProto.Builder> implements ThreadPoolOptionProtoOrBuilder
Protobuf type tensorflow.ThreadPoolOptionProto
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    The global name of the threadpool.
    The number of threads in the pool. 0 means the system picks a value based on where this option proto is used (see the declaration of the specific field for more info).
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    The global name of the threadpool.
    com.google.protobuf.ByteString
    The global name of the threadpool.
    int
    The number of threads in the pool. 0 means the system picks a value based on where this option proto is used (see the declaration of the specific field for more info).
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
     
    The global name of the threadpool.
    setGlobalNameBytes(com.google.protobuf.ByteString value)
    The global name of the threadpool.
    setNumThreads(int value)
    The number of threads in the pool. 0 means the system picks a value based on where this option proto is used (see the declaration of the specific field for more info).

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ThreadPoolOptionProto.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<ThreadPoolOptionProto.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<ThreadPoolOptionProto.Builder>
    • getDefaultInstanceForType

      public ThreadPoolOptionProto getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public ThreadPoolOptionProto build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public ThreadPoolOptionProto buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public ThreadPoolOptionProto.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ThreadPoolOptionProto.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<ThreadPoolOptionProto.Builder>
    • mergeFrom

      public ThreadPoolOptionProto.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ThreadPoolOptionProto.Builder>
      Throws:
      IOException
    • getNumThreads

      public int getNumThreads()
       The number of threads in the pool.
      
       0 means the system picks a value based on where this option proto is used
       (see the declaration of the specific field for more info).
       
      int32 num_threads = 1;
      Specified by:
      getNumThreads in interface ThreadPoolOptionProtoOrBuilder
      Returns:
      The numThreads.
    • setNumThreads

      public ThreadPoolOptionProto.Builder setNumThreads(int value)
       The number of threads in the pool.
      
       0 means the system picks a value based on where this option proto is used
       (see the declaration of the specific field for more info).
       
      int32 num_threads = 1;
      Parameters:
      value - The numThreads to set.
      Returns:
      This builder for chaining.
    • clearNumThreads

      public ThreadPoolOptionProto.Builder clearNumThreads()
       The number of threads in the pool.
      
       0 means the system picks a value based on where this option proto is used
       (see the declaration of the specific field for more info).
       
      int32 num_threads = 1;
      Returns:
      This builder for chaining.
    • getGlobalName

      public String getGlobalName()
       The global name of the threadpool.
      
       If empty, then the threadpool is made and used according to the scope it's
       in - e.g., for a session threadpool, it is used by that session only.
      
       If non-empty, then:
       - a global threadpool associated with this name is looked
       up or created. This allows, for example, sharing one threadpool across
       many sessions (e.g., like the default behavior, if
       inter_op_parallelism_threads is not configured), but still partitioning
       into a large and small pool.
       - if the threadpool for this global_name already exists, then it is an
       error if the existing pool was created using a different num_threads
       value as is specified on this call.
       - threadpools created this way are never garbage collected.
       
      string global_name = 2;
      Specified by:
      getGlobalName in interface ThreadPoolOptionProtoOrBuilder
      Returns:
      The globalName.
    • getGlobalNameBytes

      public com.google.protobuf.ByteString getGlobalNameBytes()
       The global name of the threadpool.
      
       If empty, then the threadpool is made and used according to the scope it's
       in - e.g., for a session threadpool, it is used by that session only.
      
       If non-empty, then:
       - a global threadpool associated with this name is looked
       up or created. This allows, for example, sharing one threadpool across
       many sessions (e.g., like the default behavior, if
       inter_op_parallelism_threads is not configured), but still partitioning
       into a large and small pool.
       - if the threadpool for this global_name already exists, then it is an
       error if the existing pool was created using a different num_threads
       value as is specified on this call.
       - threadpools created this way are never garbage collected.
       
      string global_name = 2;
      Specified by:
      getGlobalNameBytes in interface ThreadPoolOptionProtoOrBuilder
      Returns:
      The bytes for globalName.
    • setGlobalName

      public ThreadPoolOptionProto.Builder setGlobalName(String value)
       The global name of the threadpool.
      
       If empty, then the threadpool is made and used according to the scope it's
       in - e.g., for a session threadpool, it is used by that session only.
      
       If non-empty, then:
       - a global threadpool associated with this name is looked
       up or created. This allows, for example, sharing one threadpool across
       many sessions (e.g., like the default behavior, if
       inter_op_parallelism_threads is not configured), but still partitioning
       into a large and small pool.
       - if the threadpool for this global_name already exists, then it is an
       error if the existing pool was created using a different num_threads
       value as is specified on this call.
       - threadpools created this way are never garbage collected.
       
      string global_name = 2;
      Parameters:
      value - The globalName to set.
      Returns:
      This builder for chaining.
    • clearGlobalName

      public ThreadPoolOptionProto.Builder clearGlobalName()
       The global name of the threadpool.
      
       If empty, then the threadpool is made and used according to the scope it's
       in - e.g., for a session threadpool, it is used by that session only.
      
       If non-empty, then:
       - a global threadpool associated with this name is looked
       up or created. This allows, for example, sharing one threadpool across
       many sessions (e.g., like the default behavior, if
       inter_op_parallelism_threads is not configured), but still partitioning
       into a large and small pool.
       - if the threadpool for this global_name already exists, then it is an
       error if the existing pool was created using a different num_threads
       value as is specified on this call.
       - threadpools created this way are never garbage collected.
       
      string global_name = 2;
      Returns:
      This builder for chaining.
    • setGlobalNameBytes

      public ThreadPoolOptionProto.Builder setGlobalNameBytes(com.google.protobuf.ByteString value)
       The global name of the threadpool.
      
       If empty, then the threadpool is made and used according to the scope it's
       in - e.g., for a session threadpool, it is used by that session only.
      
       If non-empty, then:
       - a global threadpool associated with this name is looked
       up or created. This allows, for example, sharing one threadpool across
       many sessions (e.g., like the default behavior, if
       inter_op_parallelism_threads is not configured), but still partitioning
       into a large and small pool.
       - if the threadpool for this global_name already exists, then it is an
       error if the existing pool was created using a different num_threads
       value as is specified on this call.
       - threadpools created this way are never garbage collected.
       
      string global_name = 2;
      Parameters:
      value - The bytes for globalName to set.
      Returns:
      This builder for chaining.