Class JobDef.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<JobDef.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>
org.tensorflow.distruntime.JobDef.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable, JobDefOrBuilder
Enclosing class:
JobDef

public static final class JobDef.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<JobDef.Builder> implements JobDefOrBuilder
 Defines a single job in a TensorFlow cluster.
 
Protobuf type tensorflow.JobDef
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>
    • internalGetFieldAccessorTable

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

      public JobDef.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.GeneratedMessageV3.Builder<JobDef.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.GeneratedMessageV3.Builder<JobDef.Builder>
    • getDefaultInstanceForType

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

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

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

      public JobDef.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>
    • setField

      public JobDef.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>
    • clearField

      public JobDef.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>
    • clearOneof

      public JobDef.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>
    • setRepeatedField

      public JobDef.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>
    • addRepeatedField

      public JobDef.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>
    • mergeFrom

      public JobDef.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<JobDef.Builder>
    • mergeFrom

      public JobDef.Builder mergeFrom(JobDef other)
    • isInitialized

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

      public JobDef.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<JobDef.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       The name of this job.
       
      string name = 1;
      Specified by:
      getName in interface JobDefOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The name of this job.
       
      string name = 1;
      Specified by:
      getNameBytes in interface JobDefOrBuilder
      Returns:
      The bytes for name.
    • setName

      public JobDef.Builder setName(String value)
       The name of this job.
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public JobDef.Builder clearName()
       The name of this job.
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public JobDef.Builder setNameBytes(com.google.protobuf.ByteString value)
       The name of this job.
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getTasksCount

      public int getTasksCount()
      Description copied from interface: JobDefOrBuilder
       Mapping from task ID to "hostname:port" string.
      
       If the `name` field contains "worker", and the `tasks` map contains a
       mapping from 7 to "example.org:2222", then the device prefix
       "/job:worker/task:7" will be assigned to "example.org:2222".
      
       If a job has multiple replicas, host-ports will be comma-delimited, with
       one entry for each replica.
       
      map<int32, string> tasks = 2;
      Specified by:
      getTasksCount in interface JobDefOrBuilder
    • containsTasks

      public boolean containsTasks(int key)
       Mapping from task ID to "hostname:port" string.
      
       If the `name` field contains "worker", and the `tasks` map contains a
       mapping from 7 to "example.org:2222", then the device prefix
       "/job:worker/task:7" will be assigned to "example.org:2222".
      
       If a job has multiple replicas, host-ports will be comma-delimited, with
       one entry for each replica.
       
      map<int32, string> tasks = 2;
      Specified by:
      containsTasks in interface JobDefOrBuilder
    • getTasks

      @Deprecated public Map<Integer,String> getTasks()
      Deprecated.
      Use getTasksMap() instead.
      Specified by:
      getTasks in interface JobDefOrBuilder
    • getTasksMap

      public Map<Integer,String> getTasksMap()
       Mapping from task ID to "hostname:port" string.
      
       If the `name` field contains "worker", and the `tasks` map contains a
       mapping from 7 to "example.org:2222", then the device prefix
       "/job:worker/task:7" will be assigned to "example.org:2222".
      
       If a job has multiple replicas, host-ports will be comma-delimited, with
       one entry for each replica.
       
      map<int32, string> tasks = 2;
      Specified by:
      getTasksMap in interface JobDefOrBuilder
    • getTasksOrDefault

      public String getTasksOrDefault(int key, String defaultValue)
       Mapping from task ID to "hostname:port" string.
      
       If the `name` field contains "worker", and the `tasks` map contains a
       mapping from 7 to "example.org:2222", then the device prefix
       "/job:worker/task:7" will be assigned to "example.org:2222".
      
       If a job has multiple replicas, host-ports will be comma-delimited, with
       one entry for each replica.
       
      map<int32, string> tasks = 2;
      Specified by:
      getTasksOrDefault in interface JobDefOrBuilder
    • getTasksOrThrow

      public String getTasksOrThrow(int key)
       Mapping from task ID to "hostname:port" string.
      
       If the `name` field contains "worker", and the `tasks` map contains a
       mapping from 7 to "example.org:2222", then the device prefix
       "/job:worker/task:7" will be assigned to "example.org:2222".
      
       If a job has multiple replicas, host-ports will be comma-delimited, with
       one entry for each replica.
       
      map<int32, string> tasks = 2;
      Specified by:
      getTasksOrThrow in interface JobDefOrBuilder
    • clearTasks

      public JobDef.Builder clearTasks()
    • removeTasks

      public JobDef.Builder removeTasks(int key)
       Mapping from task ID to "hostname:port" string.
      
       If the `name` field contains "worker", and the `tasks` map contains a
       mapping from 7 to "example.org:2222", then the device prefix
       "/job:worker/task:7" will be assigned to "example.org:2222".
      
       If a job has multiple replicas, host-ports will be comma-delimited, with
       one entry for each replica.
       
      map<int32, string> tasks = 2;
    • getMutableTasks

      @Deprecated public Map<Integer,String> getMutableTasks()
      Deprecated.
      Use alternate mutation accessors instead.
    • putTasks

      public JobDef.Builder putTasks(int key, String value)
       Mapping from task ID to "hostname:port" string.
      
       If the `name` field contains "worker", and the `tasks` map contains a
       mapping from 7 to "example.org:2222", then the device prefix
       "/job:worker/task:7" will be assigned to "example.org:2222".
      
       If a job has multiple replicas, host-ports will be comma-delimited, with
       one entry for each replica.
       
      map<int32, string> tasks = 2;
    • putAllTasks

      public JobDef.Builder putAllTasks(Map<Integer,String> values)
       Mapping from task ID to "hostname:port" string.
      
       If the `name` field contains "worker", and the `tasks` map contains a
       mapping from 7 to "example.org:2222", then the device prefix
       "/job:worker/task:7" will be assigned to "example.org:2222".
      
       If a job has multiple replicas, host-ports will be comma-delimited, with
       one entry for each replica.
       
      map<int32, string> tasks = 2;
    • setUnknownFields

      public final JobDef.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>
    • mergeUnknownFields

      public final JobDef.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>