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 --- .../openslx/bwlp/thrift/iface/OperatingSystem.java | 242 +++++++++------------ 1 file changed, 105 insertions(+), 137 deletions(-) (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/OperatingSystem.java') diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/OperatingSystem.java b/src/main/java/org/openslx/bwlp/thrift/iface/OperatingSystem.java index 364ad03..fc1e577 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/OperatingSystem.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/OperatingSystem.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 OperatingSystem 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("OperatingSystem"); @@ -45,16 +18,13 @@ public class OperatingSystem implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new OperatingSystemStandardSchemeFactory()); - schemes.put(TupleScheme.class, new OperatingSystemTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new OperatingSystemStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new OperatingSystemTupleSchemeFactory(); public int osId; // required - public String osName; // required - public Map virtualizerOsId; // required - public String architecture; // required + public @org.apache.thrift.annotation.Nullable java.lang.String osName; // required + public @org.apache.thrift.annotation.Nullable java.util.Map virtualizerOsId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String architecture; // required public int maxMemMb; // required public int maxCores; // required @@ -67,10 +37,10 @@ public class OperatingSystem 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); } } @@ -78,6 +48,7 @@ public class OperatingSystem 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.OS_ID, new org.apache.thrift.meta_data.FieldMetaData("osId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.OS_NAME, new org.apache.thrift.meta_data.FieldMetaData("osName", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -153,7 +125,7 @@ public class OperatingSystem implements org.apache.thrift.TBase virtualizerOsId, - String architecture, + java.lang.String osName, + java.util.Map virtualizerOsId, + java.lang.String architecture, int maxMemMb, int maxCores) { @@ -190,7 +162,7 @@ public class OperatingSystem implements org.apache.thrift.TBase __this__virtualizerOsId = new HashMap(other.virtualizerOsId); + java.util.Map __this__virtualizerOsId = new java.util.HashMap(other.virtualizerOsId); this.virtualizerOsId = __this__virtualizerOsId; } if (other.isSetArchitecture()) { @@ -228,23 +200,24 @@ public class OperatingSystem implements org.apache.thrift.TBase(); + this.virtualizerOsId = new java.util.HashMap(); } this.virtualizerOsId.put(key, val); } - public Map getVirtualizerOsId() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getVirtualizerOsId() { return this.virtualizerOsId; } - public OperatingSystem setVirtualizerOsId(Map virtualizerOsId) { + public OperatingSystem setVirtualizerOsId(@org.apache.thrift.annotation.Nullable java.util.Map virtualizerOsId) { this.virtualizerOsId = virtualizerOsId; return this; } @@ -299,11 +273,12 @@ public class OperatingSystem implements org.apache.thrift.TBase)value); + setVirtualizerOsId((java.util.Map)value); } break; @@ -399,7 +374,7 @@ public class OperatingSystem implements org.apache.thrift.TBase list = new ArrayList(); + int hashCode = 1; - boolean present_osId = true; - list.add(present_osId); - if (present_osId) - list.add(osId); + hashCode = hashCode * 8191 + osId; - boolean present_osName = true && (isSetOsName()); - list.add(present_osName); - if (present_osName) - list.add(osName); + hashCode = hashCode * 8191 + ((isSetOsName()) ? 131071 : 524287); + if (isSetOsName()) + hashCode = hashCode * 8191 + osName.hashCode(); - boolean present_virtualizerOsId = true && (isSetVirtualizerOsId()); - list.add(present_virtualizerOsId); - if (present_virtualizerOsId) - list.add(virtualizerOsId); + hashCode = hashCode * 8191 + ((isSetVirtualizerOsId()) ? 131071 : 524287); + if (isSetVirtualizerOsId()) + hashCode = hashCode * 8191 + virtualizerOsId.hashCode(); - boolean present_architecture = true && (isSetArchitecture()); - list.add(present_architecture); - if (present_architecture) - list.add(architecture); + hashCode = hashCode * 8191 + ((isSetArchitecture()) ? 131071 : 524287); + if (isSetArchitecture()) + hashCode = hashCode * 8191 + architecture.hashCode(); - boolean present_maxMemMb = true; - list.add(present_maxMemMb); - if (present_maxMemMb) - list.add(maxMemMb); + hashCode = hashCode * 8191 + maxMemMb; - boolean present_maxCores = true; - list.add(present_maxCores); - if (present_maxCores) - list.add(maxCores); + hashCode = hashCode * 8191 + maxCores; - return list.hashCode(); + return hashCode; } @Override @@ -584,7 +548,7 @@ public class OperatingSystem implements org.apache.thrift.TBase { + private static class OperatingSystemStandardScheme extends org.apache.thrift.scheme.StandardScheme { public void read(org.apache.thrift.protocol.TProtocol iprot, OperatingSystem struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -764,9 +729,9 @@ public class OperatingSystem implements org.apache.thrift.TBase(2*_map24.size); - String _key25; - String _val26; + struct.virtualizerOsId = new java.util.HashMap(2*_map24.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key25; + @org.apache.thrift.annotation.Nullable java.lang.String _val26; for (int _i27 = 0; _i27 < _map24.size; ++_i27) { _key25 = iprot.readString(); @@ -831,7 +796,7 @@ public class OperatingSystem implements org.apache.thrift.TBase _iter28 : struct.virtualizerOsId.entrySet()) + for (java.util.Map.Entry _iter28 : struct.virtualizerOsId.entrySet()) { oprot.writeString(_iter28.getKey()); oprot.writeString(_iter28.getValue()); @@ -857,18 +822,18 @@ public class OperatingSystem implements org.apache.thrift.TBase { + private static class OperatingSystemTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, OperatingSystem 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.isSetOsId()) { optionals.set(0); } @@ -897,7 +862,7 @@ public class OperatingSystem implements org.apache.thrift.TBase _iter29 : struct.virtualizerOsId.entrySet()) + for (java.util.Map.Entry _iter29 : struct.virtualizerOsId.entrySet()) { oprot.writeString(_iter29.getKey()); oprot.writeString(_iter29.getValue()); @@ -917,8 +882,8 @@ public class OperatingSystem implements org.apache.thrift.TBase(2*_map30.size); - String _key31; - String _val32; + org.apache.thrift.protocol.TMap _map30 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.virtualizerOsId = new java.util.HashMap(2*_map30.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key31; + @org.apache.thrift.annotation.Nullable java.lang.String _val32; for (int _i33 = 0; _i33 < _map30.size; ++_i33) { _key31 = iprot.readString(); @@ -957,5 +922,8 @@ public class OperatingSystem 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