Class NamespaceShardsAssignment.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<NamespaceShardsAssignment.Builder>
io.streamnative.oxia.proto.NamespaceShardsAssignment.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, NamespaceShardsAssignmentOrBuilder, Cloneable
Enclosing class:
NamespaceShardsAssignment

public static final class NamespaceShardsAssignment.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<NamespaceShardsAssignment.Builder> implements NamespaceShardsAssignmentOrBuilder

 The shards assignments for a given namespace
 
Protobuf type io.streamnative.oxia.proto.NamespaceShardsAssignment
  • 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<NamespaceShardsAssignment.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<NamespaceShardsAssignment.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<NamespaceShardsAssignment.Builder>
    • getDefaultInstanceForType

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

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

      public NamespaceShardsAssignment buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.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<NamespaceShardsAssignment.Builder>
    • setField

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

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

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

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

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

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

    • isInitialized

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

      public NamespaceShardsAssignment.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<NamespaceShardsAssignment.Builder>
      Throws:
      IOException
    • getAssignmentsList

      public List<ShardAssignment> getAssignmentsList()
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
      Specified by:
      getAssignmentsList in interface NamespaceShardsAssignmentOrBuilder
    • getAssignmentsCount

      public int getAssignmentsCount()
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
      Specified by:
      getAssignmentsCount in interface NamespaceShardsAssignmentOrBuilder
    • getAssignments

      public ShardAssignment getAssignments(int index)
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
      Specified by:
      getAssignments in interface NamespaceShardsAssignmentOrBuilder
    • setAssignments

      public NamespaceShardsAssignment.Builder setAssignments(int index, ShardAssignment value)
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
    • setAssignments

      public NamespaceShardsAssignment.Builder setAssignments(int index, ShardAssignment.Builder builderForValue)
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
    • addAssignments

      public NamespaceShardsAssignment.Builder addAssignments(ShardAssignment value)
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
    • addAssignments

      public NamespaceShardsAssignment.Builder addAssignments(int index, ShardAssignment value)
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
    • addAssignments

      public NamespaceShardsAssignment.Builder addAssignments(ShardAssignment.Builder builderForValue)
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
    • addAssignments

      public NamespaceShardsAssignment.Builder addAssignments(int index, ShardAssignment.Builder builderForValue)
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
    • addAllAssignments

      public NamespaceShardsAssignment.Builder addAllAssignments(Iterable<? extends ShardAssignment> values)
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
    • clearAssignments

      public NamespaceShardsAssignment.Builder clearAssignments()
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
    • removeAssignments

      public NamespaceShardsAssignment.Builder removeAssignments(int index)
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
    • getAssignmentsBuilder

      public ShardAssignment.Builder getAssignmentsBuilder(int index)
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
    • getAssignmentsOrBuilder

      public ShardAssignmentOrBuilder getAssignmentsOrBuilder(int index)
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
      Specified by:
      getAssignmentsOrBuilder in interface NamespaceShardsAssignmentOrBuilder
    • getAssignmentsOrBuilderList

      public List<? extends ShardAssignmentOrBuilder> getAssignmentsOrBuilderList()
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
      Specified by:
      getAssignmentsOrBuilderList in interface NamespaceShardsAssignmentOrBuilder
    • addAssignmentsBuilder

      public ShardAssignment.Builder addAssignmentsBuilder()
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
    • addAssignmentsBuilder

      public ShardAssignment.Builder addAssignmentsBuilder(int index)
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
    • getAssignmentsBuilderList

      public List<ShardAssignment.Builder> getAssignmentsBuilderList()
       All assignments in the response stream will contain all the
       assignments to bring the client up to date. For example, if a shard is
       split, the stream will return a single response containing all the new
       shard assignments as opposed to multiple stream responses, each containing
       a single shard assignment.
       
      repeated .io.streamnative.oxia.proto.ShardAssignment assignments = 1;
    • getShardKeyRouterValue

      public int getShardKeyRouterValue()
       Indicates the mechanism by which the keys are assigned to the individual
       shards.
       
      .io.streamnative.oxia.proto.ShardKeyRouter shard_key_router = 2;
      Specified by:
      getShardKeyRouterValue in interface NamespaceShardsAssignmentOrBuilder
      Returns:
      The enum numeric value on the wire for shardKeyRouter.
    • setShardKeyRouterValue

      public NamespaceShardsAssignment.Builder setShardKeyRouterValue(int value)
       Indicates the mechanism by which the keys are assigned to the individual
       shards.
       
      .io.streamnative.oxia.proto.ShardKeyRouter shard_key_router = 2;
      Parameters:
      value - The enum numeric value on the wire for shardKeyRouter to set.
      Returns:
      This builder for chaining.
    • getShardKeyRouter

      public ShardKeyRouter getShardKeyRouter()
       Indicates the mechanism by which the keys are assigned to the individual
       shards.
       
      .io.streamnative.oxia.proto.ShardKeyRouter shard_key_router = 2;
      Specified by:
      getShardKeyRouter in interface NamespaceShardsAssignmentOrBuilder
      Returns:
      The shardKeyRouter.
    • setShardKeyRouter

      public NamespaceShardsAssignment.Builder setShardKeyRouter(ShardKeyRouter value)
       Indicates the mechanism by which the keys are assigned to the individual
       shards.
       
      .io.streamnative.oxia.proto.ShardKeyRouter shard_key_router = 2;
      Parameters:
      value - The shardKeyRouter to set.
      Returns:
      This builder for chaining.
    • clearShardKeyRouter

      public NamespaceShardsAssignment.Builder clearShardKeyRouter()
       Indicates the mechanism by which the keys are assigned to the individual
       shards.
       
      .io.streamnative.oxia.proto.ShardKeyRouter shard_key_router = 2;
      Returns:
      This builder for chaining.
    • setUnknownFields

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

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