Skip to content

Commit

Permalink
feat(java-client): java client add class host_port for fqdn compile
Browse files Browse the repository at this point in the history
  • Loading branch information
yujingwei committed Apr 15, 2024
1 parent 9adda76 commit 8ae490b
Showing 1 changed file with 53 additions and 4 deletions.
57 changes: 53 additions & 4 deletions java-client/src/main/java/org/apache/pegasus/base/host_port.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ public class host_port
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
new host_portTupleSchemeFactory();

public String host;

public short port;

public int hyType;

/**
* The set of fields this struct contains, along with convenience methods for finding and
* manipulating them.
Expand Down Expand Up @@ -105,17 +111,53 @@ public java.lang.String getFieldName() {
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(host_port.class, metaDataMap);
}

public host_port() {}
public host_port() {
this.host = null;
this.port = 0;
this.hyType = 0;
}

/** Performs a deep copy on <i>other</i>. */
public host_port(host_port other) {}
public host_port(host_port other) {
this.host = other.host;
this.port = other.port;
this.hyType = other.hyType;
}

public host_port deepCopy() {
return new host_port(this);
}

public String getHost() {
return this.host;
}

public short getPort() {
return this.port;
}

public int getHyType() {
return this.hyType;
}

public void setHost(String host) {
this.host = host;
}

public void setPort(short port) {
this.port = port;
}

public void setHyType(int hyType) {
this.hyType = hyType;
}

@Override
public void clear() {}
public void clear() {
this.host = null;
this.port = 0;
this.hyType = 0;
}

public void setFieldValue(_Fields field, java.lang.Object value) {
switch (field) {
Expand Down Expand Up @@ -179,12 +221,19 @@ public _Fields fieldForId(int fieldId) {
}

public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
host = iprot.readString();
port = iprot.readI16();
hyType = iprot.readI32();

validate();
}

public void write(org.apache.thrift.protocol.TProtocol oprot)
throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
oprot.writeString(host);
oprot.writeI16(port);
oprot.writeI32(hyType);
}

@Override
Expand Down

0 comments on commit 8ae490b

Please sign in to comment.