/** * <pre> * Cells is the list of cells that contain tablets for this shard. * No lock is necessary to update this field. * </pre> * * <code>repeated string cells = 5;</code> */ public Builder addCellsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureCellsIsMutable(); cells_.add(value); onChanged(); return this; }
/** * <pre> * served_types has at most one entry per TabletType * The keyspace lock is always taken when changing this. * </pre> * * <code>repeated .topodata.Shard.ServedType served_types = 3;</code> */ public Builder setServedTypes( int index, io.vitess.proto.Topodata.Shard.ServedType value) { if (servedTypesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureServedTypesIsMutable(); servedTypes_.set(index, value); onChanged(); } else { servedTypesBuilder_.setMessage(index, value); } return this; } /**
/** * <pre> * SourceShards is the list of shards we're replicating from, * using filtered replication. * The keyspace lock is always taken when changing this. * </pre> * * <code>repeated .topodata.Shard.SourceShard source_shards = 4;</code> */ public Builder addSourceShards( int index, io.vitess.proto.Topodata.Shard.SourceShard value) { if (sourceShardsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSourceShardsIsMutable(); sourceShards_.add(index, value); onChanged(); } else { sourceShardsBuilder_.addMessage(index, value); } return this; } /**
public Builder mergeFrom(io.vitess.proto.Topodata.Shard other) { if (other == io.vitess.proto.Topodata.Shard.getDefaultInstance()) return this; if (other.hasMasterAlias()) { mergeMasterAlias(other.getMasterAlias()); mergeKeyRange(other.getKeyRange()); bitField0_ = (bitField0_ & ~0x00000004); } else { ensureServedTypesIsMutable(); servedTypes_.addAll(other.servedTypes_); onChanged(); servedTypesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServedTypesFieldBuilder() : null; } else { servedTypesBuilder_.addAllMessages(other.servedTypes_); bitField0_ = (bitField0_ & ~0x00000008); } else { ensureSourceShardsIsMutable(); sourceShards_.addAll(other.sourceShards_); onChanged(); sourceShardsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSourceShardsFieldBuilder() : null;
public Builder mergeFrom(io.vitess.proto.Topodata.Shard other) { if (other == io.vitess.proto.Topodata.Shard.getDefaultInstance()) return this; if (other.hasMasterAlias()) { mergeMasterAlias(other.getMasterAlias()); mergeKeyRange(other.getKeyRange()); bitField0_ = (bitField0_ & ~0x00000004); } else { ensureServedTypesIsMutable(); servedTypes_.addAll(other.servedTypes_); onChanged(); servedTypesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServedTypesFieldBuilder() : null; } else { servedTypesBuilder_.addAllMessages(other.servedTypes_); bitField0_ = (bitField0_ & ~0x00000008); } else { ensureSourceShardsIsMutable(); sourceShards_.addAll(other.sourceShards_); onChanged(); sourceShardsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSourceShardsFieldBuilder() : null;
/** * <pre> * key_range is the KeyRange for this shard. It can be unset if: * - we are not using range-based sharding in this shard. * - the shard covers the entire keyrange. * This must match the shard name based on our other conventions, but * helpful to have it decomposed here. * Once set at creation time, it is never changed. * </pre> * * <code>.topodata.KeyRange key_range = 2;</code> */ private com.google.protobuf.SingleFieldBuilderV3< io.vitess.proto.Topodata.KeyRange, io.vitess.proto.Topodata.KeyRange.Builder, io.vitess.proto.Topodata.KeyRangeOrBuilder> getKeyRangeFieldBuilder() { if (keyRangeBuilder_ == null) { keyRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.vitess.proto.Topodata.KeyRange, io.vitess.proto.Topodata.KeyRange.Builder, io.vitess.proto.Topodata.KeyRangeOrBuilder>( getKeyRange(), getParentForChildren(), isClean()); keyRange_ = null; } return keyRangeBuilder_; }
/** * <pre> * No lock is necessary to update this field, when for instance * TabletExternallyReparented updates this. However, we lock the * shard for reparenting operations (InitShardMaster, * PlannedReparentShard,EmergencyReparentShard), to guarantee * exclusive operation. * </pre> * * <code>.topodata.TabletAlias master_alias = 1;</code> */ private com.google.protobuf.SingleFieldBuilderV3< io.vitess.proto.Topodata.TabletAlias, io.vitess.proto.Topodata.TabletAlias.Builder, io.vitess.proto.Topodata.TabletAliasOrBuilder> getMasterAliasFieldBuilder() { if (masterAliasBuilder_ == null) { masterAliasBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.vitess.proto.Topodata.TabletAlias, io.vitess.proto.Topodata.TabletAlias.Builder, io.vitess.proto.Topodata.TabletAliasOrBuilder>( getMasterAlias(), getParentForChildren(), isClean()); masterAlias_ = null; } return masterAliasBuilder_; }
/** * <pre> * tablet_controls has at most one entry per TabletType. * The keyspace lock is always taken when changing this. * </pre> * * <code>repeated .topodata.Shard.TabletControl tablet_controls = 6;</code> */ public Builder setTabletControls( int index, io.vitess.proto.Topodata.Shard.TabletControl value) { if (tabletControlsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTabletControlsIsMutable(); tabletControls_.set(index, value); onChanged(); } else { tabletControlsBuilder_.setMessage(index, value); } return this; } /**
/** * <pre> * served_types has at most one entry per TabletType * The keyspace lock is always taken when changing this. * </pre> * * <code>repeated .topodata.Shard.ServedType served_types = 3;</code> */ public Builder setServedTypes( int index, io.vitess.proto.Topodata.Shard.ServedType value) { if (servedTypesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureServedTypesIsMutable(); servedTypes_.set(index, value); onChanged(); } else { servedTypesBuilder_.setMessage(index, value); } return this; } /**
/** * <pre> * key_range is the KeyRange for this shard. It can be unset if: * - we are not using range-based sharding in this shard. * - the shard covers the entire keyrange. * This must match the shard name based on our other conventions, but * helpful to have it decomposed here. * Once set at creation time, it is never changed. * </pre> * * <code>.topodata.KeyRange key_range = 2;</code> */ private com.google.protobuf.SingleFieldBuilderV3< io.vitess.proto.Topodata.KeyRange, io.vitess.proto.Topodata.KeyRange.Builder, io.vitess.proto.Topodata.KeyRangeOrBuilder> getKeyRangeFieldBuilder() { if (keyRangeBuilder_ == null) { keyRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.vitess.proto.Topodata.KeyRange, io.vitess.proto.Topodata.KeyRange.Builder, io.vitess.proto.Topodata.KeyRangeOrBuilder>( getKeyRange(), getParentForChildren(), isClean()); keyRange_ = null; } return keyRangeBuilder_; }
/** * <pre> * tablet_controls has at most one entry per TabletType. * The keyspace lock is always taken when changing this. * </pre> * * <code>repeated .topodata.Shard.TabletControl tablet_controls = 6;</code> */ public Builder addTabletControls(io.vitess.proto.Topodata.Shard.TabletControl value) { if (tabletControlsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTabletControlsIsMutable(); tabletControls_.add(value); onChanged(); } else { tabletControlsBuilder_.addMessage(value); } return this; } /**
/** * <pre> * served_types has at most one entry per TabletType * The keyspace lock is always taken when changing this. * </pre> * * <code>repeated .topodata.Shard.ServedType served_types = 3;</code> */ public Builder addServedTypes(io.vitess.proto.Topodata.Shard.ServedType value) { if (servedTypesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureServedTypesIsMutable(); servedTypes_.add(value); onChanged(); } else { servedTypesBuilder_.addMessage(value); } return this; } /**
/** * <pre> * No lock is necessary to update this field, when for instance * TabletExternallyReparented updates this. However, we lock the * shard for reparenting operations (InitShardMaster, * PlannedReparentShard,EmergencyReparentShard), to guarantee * exclusive operation. * </pre> * * <code>.topodata.TabletAlias master_alias = 1;</code> */ private com.google.protobuf.SingleFieldBuilderV3< io.vitess.proto.Topodata.TabletAlias, io.vitess.proto.Topodata.TabletAlias.Builder, io.vitess.proto.Topodata.TabletAliasOrBuilder> getMasterAliasFieldBuilder() { if (masterAliasBuilder_ == null) { masterAliasBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.vitess.proto.Topodata.TabletAlias, io.vitess.proto.Topodata.TabletAlias.Builder, io.vitess.proto.Topodata.TabletAliasOrBuilder>( getMasterAlias(), getParentForChildren(), isClean()); masterAlias_ = null; } return masterAliasBuilder_; }
/** * <pre> * SourceShards is the list of shards we're replicating from, * using filtered replication. * The keyspace lock is always taken when changing this. * </pre> * * <code>repeated .topodata.Shard.SourceShard source_shards = 4;</code> */ public Builder addSourceShards( int index, io.vitess.proto.Topodata.Shard.SourceShard value) { if (sourceShardsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSourceShardsIsMutable(); sourceShards_.add(index, value); onChanged(); } else { sourceShardsBuilder_.addMessage(index, value); } return this; } /**
/** * <pre> * SourceShards is the list of shards we're replicating from, * using filtered replication. * The keyspace lock is always taken when changing this. * </pre> * * <code>repeated .topodata.Shard.SourceShard source_shards = 4;</code> */ public Builder setSourceShards( int index, io.vitess.proto.Topodata.Shard.SourceShard value) { if (sourceShardsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSourceShardsIsMutable(); sourceShards_.set(index, value); onChanged(); } else { sourceShardsBuilder_.setMessage(index, value); } return this; } /**
/** * <pre> * SourceShards is the list of shards we're replicating from, * using filtered replication. * The keyspace lock is always taken when changing this. * </pre> * * <code>repeated .topodata.Shard.SourceShard source_shards = 4;</code> */ public Builder setSourceShards( int index, io.vitess.proto.Topodata.Shard.SourceShard value) { if (sourceShardsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSourceShardsIsMutable(); sourceShards_.set(index, value); onChanged(); } else { sourceShardsBuilder_.setMessage(index, value); } return this; } /**
/** * <pre> * SourceShards is the list of shards we're replicating from, * using filtered replication. * The keyspace lock is always taken when changing this. * </pre> * * <code>repeated .topodata.Shard.SourceShard source_shards = 4;</code> */ public Builder addSourceShards(io.vitess.proto.Topodata.Shard.SourceShard value) { if (sourceShardsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSourceShardsIsMutable(); sourceShards_.add(value); onChanged(); } else { sourceShardsBuilder_.addMessage(value); } return this; } /**
/** * <pre> * served_types has at most one entry per TabletType * The keyspace lock is always taken when changing this. * </pre> * * <code>repeated .topodata.Shard.ServedType served_types = 3;</code> */ public Builder addServedTypes( int index, io.vitess.proto.Topodata.Shard.ServedType value) { if (servedTypesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureServedTypesIsMutable(); servedTypes_.add(index, value); onChanged(); } else { servedTypesBuilder_.addMessage(index, value); } return this; } /**
/** * <pre> * tablet_controls has at most one entry per TabletType. * The keyspace lock is always taken when changing this. * </pre> * * <code>repeated .topodata.Shard.TabletControl tablet_controls = 6;</code> */ public Builder addTabletControls( int index, io.vitess.proto.Topodata.Shard.TabletControl value) { if (tabletControlsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTabletControlsIsMutable(); tabletControls_.add(index, value); onChanged(); } else { tabletControlsBuilder_.addMessage(index, value); } return this; } /**
/** * <pre> * SourceShards is the list of shards we're replicating from, * using filtered replication. * The keyspace lock is always taken when changing this. * </pre> * * <code>repeated .topodata.Shard.SourceShard source_shards = 4;</code> */ public Builder addSourceShards( io.vitess.proto.Topodata.Shard.SourceShard.Builder builderForValue) { if (sourceShardsBuilder_ == null) { ensureSourceShardsIsMutable(); sourceShards_.add(builderForValue.build()); onChanged(); } else { sourceShardsBuilder_.addMessage(builderForValue.build()); } return this; } /**