diff options
Diffstat (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/Satellite.java')
-rw-r--r-- | src/main/java/org/openslx/bwlp/thrift/iface/Satellite.java | 201 |
1 files changed, 91 insertions, 110 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/Satellite.java b/src/main/java/org/openslx/bwlp/thrift/iface/Satellite.java index 2d498af..6a9cc85 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/Satellite.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/Satellite.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.15.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.openslx.bwlp.thrift.iface; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-01-04") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17") public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._Fields>, java.io.Serializable, Cloneable, Comparable<Satellite> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Satellite"); @@ -42,15 +15,12 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ private static final org.apache.thrift.protocol.TField DISPLAY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("displayName", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField CERT_SHA256_FIELD_DESC = new org.apache.thrift.protocol.TField("certSha256", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new SatelliteStandardSchemeFactory()); - schemes.put(TupleScheme.class, new SatelliteTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SatelliteStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SatelliteTupleSchemeFactory(); - public List<String> addressList; // required - public String displayName; // required - public ByteBuffer certSha256; // required + public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> addressList; // required + public @org.apache.thrift.annotation.Nullable java.lang.String displayName; // required + public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer certSha256; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -58,10 +28,10 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ DISPLAY_NAME((short)2, "displayName"), CERT_SHA256((short)3, "certSha256"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -69,6 +39,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // ADDRESS_LIST @@ -88,21 +59,22 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -111,15 +83,15 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.ADDRESS_LIST, new org.apache.thrift.meta_data.FieldMetaData("addressList", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); @@ -127,7 +99,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.CERT_SHA256, new org.apache.thrift.meta_data.FieldMetaData("certSha256", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Satellite.class, metaDataMap); } @@ -135,9 +107,9 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ } public Satellite( - List<String> addressList, - String displayName, - ByteBuffer certSha256) + java.util.List<java.lang.String> addressList, + java.lang.String displayName, + java.nio.ByteBuffer certSha256) { this(); this.addressList = addressList; @@ -150,7 +122,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ */ public Satellite(Satellite other) { if (other.isSetAddressList()) { - List<String> __this__addressList = new ArrayList<String>(other.addressList); + java.util.List<java.lang.String> __this__addressList = new java.util.ArrayList<java.lang.String>(other.addressList); this.addressList = __this__addressList; } if (other.isSetDisplayName()) { @@ -176,22 +148,24 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ return (this.addressList == null) ? 0 : this.addressList.size(); } - public java.util.Iterator<String> getAddressListIterator() { + @org.apache.thrift.annotation.Nullable + public java.util.Iterator<java.lang.String> getAddressListIterator() { return (this.addressList == null) ? null : this.addressList.iterator(); } - public void addToAddressList(String elem) { + public void addToAddressList(java.lang.String elem) { if (this.addressList == null) { - this.addressList = new ArrayList<String>(); + this.addressList = new java.util.ArrayList<java.lang.String>(); } this.addressList.add(elem); } - public List<String> getAddressList() { + @org.apache.thrift.annotation.Nullable + public java.util.List<java.lang.String> getAddressList() { return this.addressList; } - public Satellite setAddressList(List<String> addressList) { + public Satellite setAddressList(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> addressList) { this.addressList = addressList; return this; } @@ -211,11 +185,12 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ } } - public String getDisplayName() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getDisplayName() { return this.displayName; } - public Satellite setDisplayName(String displayName) { + public Satellite setDisplayName(@org.apache.thrift.annotation.Nullable java.lang.String displayName) { this.displayName = displayName; return this; } @@ -240,16 +215,16 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ return certSha256 == null ? null : certSha256.array(); } - public ByteBuffer bufferForCertSha256() { + public java.nio.ByteBuffer bufferForCertSha256() { return org.apache.thrift.TBaseHelper.copyBinary(certSha256); } public Satellite setCertSha256(byte[] certSha256) { - this.certSha256 = certSha256 == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(certSha256, certSha256.length)); + this.certSha256 = certSha256 == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(certSha256.clone()); return this; } - public Satellite setCertSha256(ByteBuffer certSha256) { + public Satellite setCertSha256(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer certSha256) { this.certSha256 = org.apache.thrift.TBaseHelper.copyBinary(certSha256); return this; } @@ -269,13 +244,13 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case ADDRESS_LIST: if (value == null) { unsetAddressList(); } else { - setAddressList((List<String>)value); + setAddressList((java.util.List<java.lang.String>)value); } break; @@ -283,7 +258,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ if (value == null) { unsetDisplayName(); } else { - setDisplayName((String)value); + setDisplayName((java.lang.String)value); } break; @@ -291,14 +266,19 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ if (value == null) { unsetCertSha256(); } else { - setCertSha256((ByteBuffer)value); + if (value instanceof byte[]) { + setCertSha256((byte[])value); + } else { + setCertSha256((java.nio.ByteBuffer)value); + } } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case ADDRESS_LIST: return getAddressList(); @@ -310,13 +290,13 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ return getCertSha256(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -327,13 +307,11 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ case CERT_SHA256: return isSetCertSha256(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof Satellite) return this.equals((Satellite)that); return false; @@ -342,6 +320,8 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ public boolean equals(Satellite that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_addressList = true && this.isSetAddressList(); boolean that_present_addressList = true && that.isSetAddressList(); @@ -375,24 +355,21 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_addressList = true && (isSetAddressList()); - list.add(present_addressList); - if (present_addressList) - list.add(addressList); + hashCode = hashCode * 8191 + ((isSetAddressList()) ? 131071 : 524287); + if (isSetAddressList()) + hashCode = hashCode * 8191 + addressList.hashCode(); - boolean present_displayName = true && (isSetDisplayName()); - list.add(present_displayName); - if (present_displayName) - list.add(displayName); + hashCode = hashCode * 8191 + ((isSetDisplayName()) ? 131071 : 524287); + if (isSetDisplayName()) + hashCode = hashCode * 8191 + displayName.hashCode(); - boolean present_certSha256 = true && (isSetCertSha256()); - list.add(present_certSha256); - if (present_certSha256) - list.add(certSha256); + hashCode = hashCode * 8191 + ((isSetCertSha256()) ? 131071 : 524287); + if (isSetCertSha256()) + hashCode = hashCode * 8191 + certSha256.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -403,7 +380,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetAddressList()).compareTo(other.isSetAddressList()); + lastComparison = java.lang.Boolean.compare(isSetAddressList(), other.isSetAddressList()); if (lastComparison != 0) { return lastComparison; } @@ -413,7 +390,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDisplayName()).compareTo(other.isSetDisplayName()); + lastComparison = java.lang.Boolean.compare(isSetDisplayName(), other.isSetDisplayName()); if (lastComparison != 0) { return lastComparison; } @@ -423,7 +400,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCertSha256()).compareTo(other.isSetCertSha256()); + lastComparison = java.lang.Boolean.compare(isSetCertSha256(), other.isSetCertSha256()); if (lastComparison != 0) { return lastComparison; } @@ -436,21 +413,22 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ return 0; } + @org.apache.thrift.annotation.Nullable public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("Satellite("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("Satellite("); boolean first = true; sb.append("addressList:"); @@ -493,7 +471,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -501,13 +479,13 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ } } - private static class SatelliteStandardSchemeFactory implements SchemeFactory { + private static class SatelliteStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public SatelliteStandardScheme getScheme() { return new SatelliteStandardScheme(); } } - private static class SatelliteStandardScheme extends StandardScheme<Satellite> { + private static class SatelliteStandardScheme extends org.apache.thrift.scheme.StandardScheme<Satellite> { public void read(org.apache.thrift.protocol.TProtocol iprot, Satellite struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -523,8 +501,8 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); - struct.addressList = new ArrayList<String>(_list8.size); - String _elem9; + struct.addressList = new java.util.ArrayList<java.lang.String>(_list8.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem9; for (int _i10 = 0; _i10 < _list8.size; ++_i10) { _elem9 = iprot.readString(); @@ -572,7 +550,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ oprot.writeFieldBegin(ADDRESS_LIST_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.addressList.size())); - for (String _iter11 : struct.addressList) + for (java.lang.String _iter11 : struct.addressList) { oprot.writeString(_iter11); } @@ -596,18 +574,18 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ } - private static class SatelliteTupleSchemeFactory implements SchemeFactory { + private static class SatelliteTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public SatelliteTupleScheme getScheme() { return new SatelliteTupleScheme(); } } - private static class SatelliteTupleScheme extends TupleScheme<Satellite> { + private static class SatelliteTupleScheme extends org.apache.thrift.scheme.TupleScheme<Satellite> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, Satellite struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetAddressList()) { optionals.set(0); } @@ -621,7 +599,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ if (struct.isSetAddressList()) { { oprot.writeI32(struct.addressList.size()); - for (String _iter12 : struct.addressList) + for (java.lang.String _iter12 : struct.addressList) { oprot.writeString(_iter12); } @@ -637,13 +615,13 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ @Override public void read(org.apache.thrift.protocol.TProtocol prot, Satellite struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.addressList = new ArrayList<String>(_list13.size); - String _elem14; + org.apache.thrift.protocol.TList _list13 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.addressList = new java.util.ArrayList<java.lang.String>(_list13.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem14; for (int _i15 = 0; _i15 < _list13.size; ++_i15) { _elem14 = iprot.readString(); @@ -663,5 +641,8 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._ } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } |