@Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TServerName struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      oprot.writeString(struct.hostName);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetPort()) {
        optionals.set(0);
      }
      if (struct.isSetStartCode()) {
        optionals.set(1);
      }
      oprot.writeBitSet(optionals, 2);
      if (struct.isSetPort()) {
        oprot.writeI32(struct.port);
      }
      if (struct.isSetStartCode()) {
        oprot.writeI64(struct.startCode);
      }
    }
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java