/** * <pre> * Map of named ports. Normally this should include vt and grpc. * Going forward, the mysql port will be stored in mysql_port * instead of here. * For accessing mysql port, use topoproto.MysqlPort to fetch, and * topoproto.SetMysqlPort to set. These wrappers will ensure * legacy behavior is supported. * </pre> * * <code>map<string, int32> port_map = 4;</code> */ public int getPortMapOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map<java.lang.String, java.lang.Integer> map = internalGetPortMap().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); }
/** * <pre> * Map of named ports. Normally this should include vt and grpc. * Going forward, the mysql port will be stored in mysql_port * instead of here. * For accessing mysql port, use topoproto.MysqlPort to fetch, and * topoproto.SetMysqlPort to set. These wrappers will ensure * legacy behavior is supported. * </pre> * * <code>map<string, int32> port_map = 4;</code> */ public int getPortMapOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map<java.lang.String, java.lang.Integer> map = internalGetPortMap().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); }
/** * <pre> * Map of named ports. Normally this should include vt and grpc. * Going forward, the mysql port will be stored in mysql_port * instead of here. * For accessing mysql port, use topoproto.MysqlPort to fetch, and * topoproto.SetMysqlPort to set. These wrappers will ensure * legacy behavior is supported. * </pre> * * <code>map<string, int32> port_map = 4;</code> */ public int getPortMapOrDefault( java.lang.String key, int defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map<java.lang.String, java.lang.Integer> map = internalGetPortMap().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /**
@java.lang.Override public io.vitess.proto.Topodata.Tablet buildPartial() { io.vitess.proto.Topodata.Tablet result = new io.vitess.proto.Topodata.Tablet(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (aliasBuilder_ == null) { result.alias_ = alias_; } else { result.alias_ = aliasBuilder_.build(); } result.hostname_ = hostname_; result.portMap_ = internalGetPortMap(); result.portMap_.makeImmutable(); result.keyspace_ = keyspace_; result.shard_ = shard_; if (keyRangeBuilder_ == null) { result.keyRange_ = keyRange_; } else { result.keyRange_ = keyRangeBuilder_.build(); } result.type_ = type_; result.dbNameOverride_ = dbNameOverride_; result.tags_ = internalGetTags(); result.tags_.makeImmutable(); result.mysqlHostname_ = mysqlHostname_; result.mysqlPort_ = mysqlPort_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
@java.lang.Override public io.vitess.proto.Topodata.Tablet buildPartial() { io.vitess.proto.Topodata.Tablet result = new io.vitess.proto.Topodata.Tablet(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (aliasBuilder_ == null) { result.alias_ = alias_; } else { result.alias_ = aliasBuilder_.build(); } result.hostname_ = hostname_; result.portMap_ = internalGetPortMap(); result.portMap_.makeImmutable(); result.keyspace_ = keyspace_; result.shard_ = shard_; if (keyRangeBuilder_ == null) { result.keyRange_ = keyRange_; } else { result.keyRange_ = keyRangeBuilder_.build(); } result.type_ = type_; result.dbNameOverride_ = dbNameOverride_; result.tags_ = internalGetTags(); result.tags_.makeImmutable(); result.mysqlHostname_ = mysqlHostname_; result.mysqlPort_ = mysqlPort_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
/** * <pre> * Map of named ports. Normally this should include vt and grpc. * Going forward, the mysql port will be stored in mysql_port * instead of here. * For accessing mysql port, use topoproto.MysqlPort to fetch, and * topoproto.SetMysqlPort to set. These wrappers will ensure * legacy behavior is supported. * </pre> * * <code>map<string, int32> port_map = 4;</code> */ public int getPortMapOrDefault( java.lang.String key, int defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map<java.lang.String, java.lang.Integer> map = internalGetPortMap().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /**
/** * <pre> * Map of named ports. Normally this should include vt and grpc. * Going forward, the mysql port will be stored in mysql_port * instead of here. * For accessing mysql port, use topoproto.MysqlPort to fetch, and * topoproto.SetMysqlPort to set. These wrappers will ensure * legacy behavior is supported. * </pre> * * <code>map<string, int32> port_map = 4;</code> */ public boolean containsPortMap( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetPortMap().getMap().containsKey(key); } /**
/** * <pre> * Map of named ports. Normally this should include vt and grpc. * Going forward, the mysql port will be stored in mysql_port * instead of here. * For accessing mysql port, use topoproto.MysqlPort to fetch, and * topoproto.SetMysqlPort to set. These wrappers will ensure * legacy behavior is supported. * </pre> * * <code>map<string, int32> port_map = 4;</code> */ public boolean containsPortMap( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetPortMap().getMap().containsKey(key); } /**
@SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 4: return internalGetPortMap(); case 10: return internalGetTags(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"})
/** * <pre> * Map of named ports. Normally this should include vt and grpc. * Going forward, the mysql port will be stored in mysql_port * instead of here. * For accessing mysql port, use topoproto.MysqlPort to fetch, and * topoproto.SetMysqlPort to set. These wrappers will ensure * legacy behavior is supported. * </pre> * * <code>map<string, int32> port_map = 4;</code> */ public java.util.Map<java.lang.String, java.lang.Integer> getPortMapMap() { return internalGetPortMap().getMap(); } /**
public int getPortMapCount() { return internalGetPortMap().getMap().size(); } /**
public int getPortMapCount() { return internalGetPortMap().getMap().size(); } /**
/** * <pre> * Map of named ports. Normally this should include vt and grpc. * Going forward, the mysql port will be stored in mysql_port * instead of here. * For accessing mysql port, use topoproto.MysqlPort to fetch, and * topoproto.SetMysqlPort to set. These wrappers will ensure * legacy behavior is supported. * </pre> * * <code>map<string, int32> port_map = 4;</code> */ public java.util.Map<java.lang.String, java.lang.Integer> getPortMapMap() { return internalGetPortMap().getMap(); } /**
@SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 4: return internalGetPortMap(); case 10: return internalGetTags(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"})