/** * <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 clearServedTypes() { if (servedTypesBuilder_ == null) { servedTypes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { servedTypesBuilder_.clear(); } 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 clearTabletControls() { if (tabletControlsBuilder_ == null) { tabletControls_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); } else { tabletControlsBuilder_.clear(); } 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 clearTabletControls() { if (tabletControlsBuilder_ == null) { tabletControls_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); } else { tabletControlsBuilder_.clear(); } 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.Builder builderForValue) { if (servedTypesBuilder_ == null) { ensureServedTypesIsMutable(); servedTypes_.add(index, builderForValue.build()); onChanged(); } else { servedTypesBuilder_.addMessage(index, builderForValue.build()); } 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 removeSourceShards(int index) { if (sourceShardsBuilder_ == null) { ensureSourceShardsIsMutable(); sourceShards_.remove(index); onChanged(); } else { sourceShardsBuilder_.remove(index); } 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 clearSourceShards() { if (sourceShardsBuilder_ == null) { sourceShards_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { sourceShardsBuilder_.clear(); } 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.Builder builderForValue) { if (tabletControlsBuilder_ == null) { ensureTabletControlsIsMutable(); tabletControls_.add(index, builderForValue.build()); onChanged(); } else { tabletControlsBuilder_.addMessage(index, builderForValue.build()); } 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 removeSourceShards(int index) { if (sourceShardsBuilder_ == null) { ensureSourceShardsIsMutable(); sourceShards_.remove(index); onChanged(); } else { sourceShardsBuilder_.remove(index); } return this; } /**
/** * <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 addCells( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureCellsIsMutable(); cells_.add(value); onChanged(); 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 removeTabletControls(int index) { if (tabletControlsBuilder_ == null) { ensureTabletControlsIsMutable(); tabletControls_.remove(index); onChanged(); } else { tabletControlsBuilder_.remove(index); } return this; } /**
/** * <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 addCells( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureCellsIsMutable(); cells_.add(value); onChanged(); return this; } /**
/** * <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 addAllCells( java.lang.Iterable<java.lang.String> values) { ensureCellsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, cells_); onChanged(); return this; } /**
/** * <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 addAllCells( java.lang.Iterable<java.lang.String> values) { ensureCellsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, cells_); onChanged(); 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> */ public io.vitess.proto.Topodata.KeyRange.Builder getKeyRangeBuilder() { onChanged(); return getKeyRangeFieldBuilder().getBuilder(); } /**
/** * <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 removeServedTypes(int index) { if (servedTypesBuilder_ == null) { ensureServedTypesIsMutable(); servedTypes_.remove(index); onChanged(); } else { servedTypesBuilder_.remove(index); } 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> */ public io.vitess.proto.Topodata.TabletAlias.Builder getMasterAliasBuilder() { onChanged(); return getMasterAliasFieldBuilder().getBuilder(); } /**
/** * <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> */ public io.vitess.proto.Topodata.KeyRange.Builder getKeyRangeBuilder() { onChanged(); return getKeyRangeFieldBuilder().getBuilder(); } /**
/** * <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> */ public io.vitess.proto.Topodata.TabletAlias.Builder getMasterAliasBuilder() { onChanged(); return getMasterAliasFieldBuilder().getBuilder(); } /**
/** * <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 clearCells() { cells_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /**
/** * <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 clearCells() { cells_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /**