From 746af5d07d2b7745618eb75ef3757d150ab02042 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Fri, 17 Dec 2021 17:03:51 +0100 Subject: Update generated Thrift API to version 0.15.0 --- .../org/openslx/bwlp/thrift/iface/Satellite.java | 201 ++++++++++----------- 1 file changed, 91 insertions(+), 110 deletions(-) (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/Satellite.java') 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, java.io.Serializable, Cloneable, Comparable { 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, SchemeFactory> schemes = new HashMap, 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 addressList; // required - public String displayName; // required - public ByteBuffer certSha256; // required + public @org.apache.thrift.annotation.Nullable java.util.List 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 byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); 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 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 addressList, - String displayName, - ByteBuffer certSha256) + java.util.List 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 __this__addressList = new ArrayList(other.addressList); + java.util.List __this__addressList = new java.util.ArrayList(other.addressList); this.addressList = __this__addressList; } if (other.isSetDisplayName()) { @@ -176,22 +148,24 @@ public class Satellite implements org.apache.thrift.TBase getAddressListIterator() { + @org.apache.thrift.annotation.Nullable + public java.util.Iterator 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(); + this.addressList = new java.util.ArrayList(); } this.addressList.add(elem); } - public List getAddressList() { + @org.apache.thrift.annotation.Nullable + public java.util.List getAddressList() { return this.addressList; } - public Satellite setAddressList(List addressList) { + public Satellite setAddressList(@org.apache.thrift.annotation.Nullable java.util.List addressList) { this.addressList = addressList; return this; } @@ -211,11 +185,12 @@ public class Satellite implements org.apache.thrift.TBase)value); + setAddressList((java.util.List)value); } break; @@ -283,7 +258,7 @@ public class Satellite implements org.apache.thrift.TBase list = new ArrayList(); + 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 { + private static class SatelliteStandardScheme extends org.apache.thrift.scheme.StandardScheme { 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(_list8.size); - String _elem9; + struct.addressList = new java.util.ArrayList(_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 { + private static class SatelliteTupleScheme extends org.apache.thrift.scheme.TupleScheme { @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(_list13.size); - String _elem14; + org.apache.thrift.protocol.TList _list13 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.addressList = new java.util.ArrayList(_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 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(); + } } -- cgit v1.2.3-55-g7522