Class JobDef.Builder

  • All Implemented Interfaces:
    Cloneable, org.nd4j.shade.protobuf.Message.Builder, org.nd4j.shade.protobuf.MessageLite.Builder, org.nd4j.shade.protobuf.MessageLiteOrBuilder, org.nd4j.shade.protobuf.MessageOrBuilder, JobDefOrBuilder
    Enclosing class:
    JobDef

    public static final class JobDef.Builder
    extends org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>
    implements JobDefOrBuilder
     Defines a single job in a TensorFlow cluster.
     
    Protobuf type tensorflow.JobDef
    • Method Detail

      • getDescriptor

        public static final org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected org.nd4j.shade.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>
      • internalGetMutableMapField

        protected org.nd4j.shade.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>
      • internalGetFieldAccessorTable

        protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>
      • clear

        public JobDef.Builder clear()
        Specified by:
        clear in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        clear in interface org.nd4j.shade.protobuf.MessageLite.Builder
        Overrides:
        clear in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>
      • getDescriptorForType

        public org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface org.nd4j.shade.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>
      • getDefaultInstanceForType

        public JobDef getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageOrBuilder
      • build

        public JobDef build()
        Specified by:
        build in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        build in interface org.nd4j.shade.protobuf.MessageLite.Builder
      • buildPartial

        public JobDef buildPartial()
        Specified by:
        buildPartial in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        buildPartial in interface org.nd4j.shade.protobuf.MessageLite.Builder
      • clone

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

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

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

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

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

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

        public JobDef.Builder mergeFrom​(org.nd4j.shade.protobuf.Message other)
        Specified by:
        mergeFrom in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        mergeFrom in class org.nd4j.shade.protobuf.AbstractMessage.Builder<JobDef.Builder>
      • isInitialized

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

        public JobDef.Builder mergeFrom​(org.nd4j.shade.protobuf.CodedInputStream input,
                                        org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws IOException
        Specified by:
        mergeFrom in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface org.nd4j.shade.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class org.nd4j.shade.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 org.nd4j.shade.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​(org.nd4j.shade.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".
         
        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".
         
        map<int32, string> tasks = 2;
        Specified by:
        containsTasks 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".
         
        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".
         
        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".
         
        map<int32, string> tasks = 2;
        Specified by:
        getTasksOrThrow in interface JobDefOrBuilder
      • 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".
         
        map<int32, string> tasks = 2;
      • 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".
         
        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".
         
        map<int32, string> tasks = 2;
      • setUnknownFields

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

        public final JobDef.Builder mergeUnknownFields​(org.nd4j.shade.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<JobDef.Builder>