Class BatchingOptions.Builder

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

public static final class BatchingOptions.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<BatchingOptions.Builder> implements BatchingOptionsOrBuilder
Protobuf type tensorflow.BatchingOptions
  • Method Details

    • getDescriptor

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

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

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

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

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

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

      public BatchingOptions.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<BatchingOptions.Builder>
    • setField

      public BatchingOptions.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<BatchingOptions.Builder>
    • clearField

      public BatchingOptions.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<BatchingOptions.Builder>
    • clearOneof

      public BatchingOptions.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<BatchingOptions.Builder>
    • setRepeatedField

      public BatchingOptions.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<BatchingOptions.Builder>
    • addRepeatedField

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

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

      public BatchingOptions.Builder mergeFrom(BatchingOptions other)
    • isInitialized

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

      public BatchingOptions.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<BatchingOptions.Builder>
      Throws:
      IOException
    • getNumBatchThreads

      public int getNumBatchThreads()
       Number of scheduling threads for processing batches of work. Determines
       the number of batches processed in parallel. This should be roughly in line
       with the number of TPU cores available.
       
      int32 num_batch_threads = 1;
      Specified by:
      getNumBatchThreads in interface BatchingOptionsOrBuilder
      Returns:
      The numBatchThreads.
    • setNumBatchThreads

      public BatchingOptions.Builder setNumBatchThreads(int value)
       Number of scheduling threads for processing batches of work. Determines
       the number of batches processed in parallel. This should be roughly in line
       with the number of TPU cores available.
       
      int32 num_batch_threads = 1;
      Parameters:
      value - The numBatchThreads to set.
      Returns:
      This builder for chaining.
    • clearNumBatchThreads

      public BatchingOptions.Builder clearNumBatchThreads()
       Number of scheduling threads for processing batches of work. Determines
       the number of batches processed in parallel. This should be roughly in line
       with the number of TPU cores available.
       
      int32 num_batch_threads = 1;
      Returns:
      This builder for chaining.
    • getMaxBatchSize

      public int getMaxBatchSize()
       The maximum allowed batch size. Can be larger than allowed_batch_sizes to
       utilize large batch splitting.
       
      int32 max_batch_size = 2;
      Specified by:
      getMaxBatchSize in interface BatchingOptionsOrBuilder
      Returns:
      The maxBatchSize.
    • setMaxBatchSize

      public BatchingOptions.Builder setMaxBatchSize(int value)
       The maximum allowed batch size. Can be larger than allowed_batch_sizes to
       utilize large batch splitting.
       
      int32 max_batch_size = 2;
      Parameters:
      value - The maxBatchSize to set.
      Returns:
      This builder for chaining.
    • clearMaxBatchSize

      public BatchingOptions.Builder clearMaxBatchSize()
       The maximum allowed batch size. Can be larger than allowed_batch_sizes to
       utilize large batch splitting.
       
      int32 max_batch_size = 2;
      Returns:
      This builder for chaining.
    • getBatchTimeoutMicros

      public int getBatchTimeoutMicros()
       Maximum number of microseconds to wait before outputting an incomplete
       batch.
       
      int32 batch_timeout_micros = 3;
      Specified by:
      getBatchTimeoutMicros in interface BatchingOptionsOrBuilder
      Returns:
      The batchTimeoutMicros.
    • setBatchTimeoutMicros

      public BatchingOptions.Builder setBatchTimeoutMicros(int value)
       Maximum number of microseconds to wait before outputting an incomplete
       batch.
       
      int32 batch_timeout_micros = 3;
      Parameters:
      value - The batchTimeoutMicros to set.
      Returns:
      This builder for chaining.
    • clearBatchTimeoutMicros

      public BatchingOptions.Builder clearBatchTimeoutMicros()
       Maximum number of microseconds to wait before outputting an incomplete
       batch.
       
      int32 batch_timeout_micros = 3;
      Returns:
      This builder for chaining.
    • getAllowedBatchSizesList

      public List<Integer> getAllowedBatchSizesList()
       Optional list of allowed batch sizes. If left empty, does nothing.
       Otherwise, supplies a list of batch sizes, causing the op to pad batches up
       to one of those sizes. The entries must increase monotonically, and the
       final entry must be equal or less than the max_batch_size.
       
      repeated int32 allowed_batch_sizes = 4;
      Specified by:
      getAllowedBatchSizesList in interface BatchingOptionsOrBuilder
      Returns:
      A list containing the allowedBatchSizes.
    • getAllowedBatchSizesCount

      public int getAllowedBatchSizesCount()
       Optional list of allowed batch sizes. If left empty, does nothing.
       Otherwise, supplies a list of batch sizes, causing the op to pad batches up
       to one of those sizes. The entries must increase monotonically, and the
       final entry must be equal or less than the max_batch_size.
       
      repeated int32 allowed_batch_sizes = 4;
      Specified by:
      getAllowedBatchSizesCount in interface BatchingOptionsOrBuilder
      Returns:
      The count of allowedBatchSizes.
    • getAllowedBatchSizes

      public int getAllowedBatchSizes(int index)
       Optional list of allowed batch sizes. If left empty, does nothing.
       Otherwise, supplies a list of batch sizes, causing the op to pad batches up
       to one of those sizes. The entries must increase monotonically, and the
       final entry must be equal or less than the max_batch_size.
       
      repeated int32 allowed_batch_sizes = 4;
      Specified by:
      getAllowedBatchSizes in interface BatchingOptionsOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The allowedBatchSizes at the given index.
    • setAllowedBatchSizes

      public BatchingOptions.Builder setAllowedBatchSizes(int index, int value)
       Optional list of allowed batch sizes. If left empty, does nothing.
       Otherwise, supplies a list of batch sizes, causing the op to pad batches up
       to one of those sizes. The entries must increase monotonically, and the
       final entry must be equal or less than the max_batch_size.
       
      repeated int32 allowed_batch_sizes = 4;
      Parameters:
      index - The index to set the value at.
      value - The allowedBatchSizes to set.
      Returns:
      This builder for chaining.
    • addAllowedBatchSizes

      public BatchingOptions.Builder addAllowedBatchSizes(int value)
       Optional list of allowed batch sizes. If left empty, does nothing.
       Otherwise, supplies a list of batch sizes, causing the op to pad batches up
       to one of those sizes. The entries must increase monotonically, and the
       final entry must be equal or less than the max_batch_size.
       
      repeated int32 allowed_batch_sizes = 4;
      Parameters:
      value - The allowedBatchSizes to add.
      Returns:
      This builder for chaining.
    • addAllAllowedBatchSizes

      public BatchingOptions.Builder addAllAllowedBatchSizes(Iterable<? extends Integer> values)
       Optional list of allowed batch sizes. If left empty, does nothing.
       Otherwise, supplies a list of batch sizes, causing the op to pad batches up
       to one of those sizes. The entries must increase monotonically, and the
       final entry must be equal or less than the max_batch_size.
       
      repeated int32 allowed_batch_sizes = 4;
      Parameters:
      values - The allowedBatchSizes to add.
      Returns:
      This builder for chaining.
    • clearAllowedBatchSizes

      public BatchingOptions.Builder clearAllowedBatchSizes()
       Optional list of allowed batch sizes. If left empty, does nothing.
       Otherwise, supplies a list of batch sizes, causing the op to pad batches up
       to one of those sizes. The entries must increase monotonically, and the
       final entry must be equal or less than the max_batch_size.
       
      repeated int32 allowed_batch_sizes = 4;
      Returns:
      This builder for chaining.
    • getMaxEnqueuedBatches

      public int getMaxEnqueuedBatches()
       Maximum number of batches enqueued for processing before requests are
       failed fast.
       
      int32 max_enqueued_batches = 5;
      Specified by:
      getMaxEnqueuedBatches in interface BatchingOptionsOrBuilder
      Returns:
      The maxEnqueuedBatches.
    • setMaxEnqueuedBatches

      public BatchingOptions.Builder setMaxEnqueuedBatches(int value)
       Maximum number of batches enqueued for processing before requests are
       failed fast.
       
      int32 max_enqueued_batches = 5;
      Parameters:
      value - The maxEnqueuedBatches to set.
      Returns:
      This builder for chaining.
    • clearMaxEnqueuedBatches

      public BatchingOptions.Builder clearMaxEnqueuedBatches()
       Maximum number of batches enqueued for processing before requests are
       failed fast.
       
      int32 max_enqueued_batches = 5;
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final BatchingOptions.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<BatchingOptions.Builder>
    • mergeUnknownFields

      public final BatchingOptions.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<BatchingOptions.Builder>