From 06af3543b39316330555db2baaf305711d943973 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 20 Jul 2015 12:32:39 +0200 Subject: Thrift API changes, add configurable timeout to file transfer classes --- .../openslx/bwlp/thrift/iface/ImageBaseWrite.java | 309 ++- .../bwlp/thrift/iface/ImageDetailsRead.java | 68 +- .../bwlp/thrift/iface/ImageVersionDetails.java | 32 +- .../org/openslx/bwlp/thrift/iface/LectureRead.java | 100 +- .../openslx/bwlp/thrift/iface/LectureWrite.java | 523 ++-- .../openslx/bwlp/thrift/iface/MasterServer.java | 2633 +++++++++++++++++++- .../openslx/bwlp/thrift/iface/MasterSoftware.java | 580 +++++ .../org/openslx/bwlp/thrift/iface/MasterTag.java | 486 ++++ .../openslx/bwlp/thrift/iface/SatelliteServer.java | 472 ++-- .../java/org/openslx/filetransfer/ClassTest.java | 4 +- .../java/org/openslx/filetransfer/Downloader.java | 4 +- .../java/org/openslx/filetransfer/Listener.java | 47 +- .../java/org/openslx/filetransfer/Transfer.java | 32 +- .../java/org/openslx/filetransfer/Uploader.java | 6 +- src/main/thrift/bwlp.thrift | 37 +- 15 files changed, 4637 insertions(+), 696 deletions(-) create mode 100644 src/main/java/org/openslx/bwlp/thrift/iface/MasterSoftware.java create mode 100644 src/main/java/org/openslx/bwlp/thrift/iface/MasterTag.java diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.java index 74ed3c0..bf04945 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.java @@ -42,6 +42,8 @@ public class ImageBaseWrite implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -60,6 +62,8 @@ public class ImageBaseWrite implements org.apache.thrift.TBase addTags; // optional + public List remTags; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -73,7 +77,9 @@ public class ImageBaseWrite implements org.apache.thrift.TBase byName = new HashMap(); @@ -102,6 +108,10 @@ public class ImageBaseWrite implements org.apache.thrift.TBase metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -162,6 +173,12 @@ public class ImageBaseWrite implements org.apache.thrift.TBase __this__addTags = new ArrayList(other.addTags); + this.addTags = __this__addTags; + } + if (other.isSetRemTags()) { + List __this__remTags = new ArrayList(other.remTags); + this.remTags = __this__remTags; + } } public ImageBaseWrite deepCopy() { @@ -229,6 +254,8 @@ public class ImageBaseWrite implements org.apache.thrift.TBase getAddTagsIterator() { + return (this.addTags == null) ? null : this.addTags.iterator(); + } + + public void addToAddTags(String elem) { + if (this.addTags == null) { + this.addTags = new ArrayList(); + } + this.addTags.add(elem); + } + + public List getAddTags() { + return this.addTags; + } + + public ImageBaseWrite setAddTags(List addTags) { + this.addTags = addTags; + return this; + } + + public void unsetAddTags() { + this.addTags = null; + } + + /** Returns true if field addTags is set (has been assigned a value) and false otherwise */ + public boolean isSetAddTags() { + return this.addTags != null; + } + + public void setAddTagsIsSet(boolean value) { + if (!value) { + this.addTags = null; + } + } + + public int getRemTagsSize() { + return (this.remTags == null) ? 0 : this.remTags.size(); + } + + public java.util.Iterator getRemTagsIterator() { + return (this.remTags == null) ? null : this.remTags.iterator(); + } + + public void addToRemTags(String elem) { + if (this.remTags == null) { + this.remTags = new ArrayList(); + } + this.remTags.add(elem); + } + + public List getRemTags() { + return this.remTags; + } + + public ImageBaseWrite setRemTags(List remTags) { + this.remTags = remTags; + return this; + } + + public void unsetRemTags() { + this.remTags = null; + } + + /** Returns true if field remTags is set (has been assigned a value) and false otherwise */ + public boolean isSetRemTags() { + return this.remTags != null; + } + + public void setRemTagsIsSet(boolean value) { + if (!value) { + this.remTags = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case IMAGE_NAME: @@ -463,6 +568,22 @@ public class ImageBaseWrite implements org.apache.thrift.TBase)value); + } + break; + + case REM_TAGS: + if (value == null) { + unsetRemTags(); + } else { + setRemTags((List)value); + } + break; + } } @@ -489,6 +610,12 @@ public class ImageBaseWrite implements org.apache.thrift.TBase(_list34.size); + for (int _i35 = 0; _i35 < _list34.size; ++_i35) + { + String _elem36; + _elem36 = iprot.readString(); + struct.addTags.add(_elem36); + } + iprot.readListEnd(); + } + struct.setAddTagsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // REM_TAGS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list37 = iprot.readListBegin(); + struct.remTags = new ArrayList(_list37.size); + for (int _i38 = 0; _i38 < _list37.size; ++_i38) + { + String _elem39; + _elem39 = iprot.readString(); + struct.remTags.add(_elem39); + } + iprot.readListEnd(); + } + struct.setRemTagsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -898,6 +1123,34 @@ public class ImageBaseWrite implements org.apache.thrift.TBase(_list44.size); + for (int _i45 = 0; _i45 < _list44.size; ++_i45) + { + String _elem46; + _elem46 = iprot.readString(); + struct.addTags.add(_elem46); + } + } + struct.setAddTagsIsSet(true); + } + if (incoming.get(8)) { + { + org.apache.thrift.protocol.TList _list47 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.remTags = new ArrayList(_list47.size); + for (int _i48 = 0; _i48 < _list47.size; ++_i48) + { + String _elem49; + _elem49 = iprot.readString(); + struct.remTags.add(_elem49); + } + } + struct.setRemTagsIsSet(true); + } } } diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java index 2e6581d..386cf23 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java @@ -1625,14 +1625,14 @@ public class ImageDetailsRead implements org.apache.thrift.TBase(_list42.size); - for (int _i43 = 0; _i43 < _list42.size; ++_i43) + org.apache.thrift.protocol.TList _list58 = iprot.readListBegin(); + struct.versions = new ArrayList(_list58.size); + for (int _i59 = 0; _i59 < _list58.size; ++_i59) { - ImageVersionDetails _elem44; - _elem44 = new ImageVersionDetails(); - _elem44.read(iprot); - struct.versions.add(_elem44); + ImageVersionDetails _elem60; + _elem60 = new ImageVersionDetails(); + _elem60.read(iprot); + struct.versions.add(_elem60); } iprot.readListEnd(); } @@ -1660,13 +1660,13 @@ public class ImageDetailsRead implements org.apache.thrift.TBase(_list45.size); - for (int _i46 = 0; _i46 < _list45.size; ++_i46) + org.apache.thrift.protocol.TList _list61 = iprot.readListBegin(); + struct.tags = new ArrayList(_list61.size); + for (int _i62 = 0; _i62 < _list61.size; ++_i62) { - String _elem47; - _elem47 = iprot.readString(); - struct.tags.add(_elem47); + String _elem63; + _elem63 = iprot.readString(); + struct.tags.add(_elem63); } iprot.readListEnd(); } @@ -1786,9 +1786,9 @@ public class ImageDetailsRead implements org.apache.thrift.TBase(_list52.size); - for (int _i53 = 0; _i53 < _list52.size; ++_i53) + org.apache.thrift.protocol.TList _list68 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.versions = new ArrayList(_list68.size); + for (int _i69 = 0; _i69 < _list68.size; ++_i69) { - ImageVersionDetails _elem54; - _elem54 = new ImageVersionDetails(); - _elem54.read(iprot); - struct.versions.add(_elem54); + ImageVersionDetails _elem70; + _elem70 = new ImageVersionDetails(); + _elem70.read(iprot); + struct.versions.add(_elem70); } } struct.setVersionsIsSet(true); @@ -2040,13 +2040,13 @@ public class ImageDetailsRead implements org.apache.thrift.TBase(_list55.size); - for (int _i56 = 0; _i56 < _list55.size; ++_i56) + org.apache.thrift.protocol.TList _list71 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.tags = new ArrayList(_list71.size); + for (int _i72 = 0; _i72 < _list71.size; ++_i72) { - String _elem57; - _elem57 = iprot.readString(); - struct.tags.add(_elem57); + String _elem73; + _elem73 = iprot.readString(); + struct.tags.add(_elem73); } } struct.setTagsIsSet(true); diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java index 608443d..db082be 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java @@ -1079,13 +1079,13 @@ public class ImageVersionDetails implements org.apache.thrift.TBase(_list34.size); - for (int _i35 = 0; _i35 < _list34.size; ++_i35) + org.apache.thrift.protocol.TList _list50 = iprot.readListBegin(); + struct.software = new ArrayList(_list50.size); + for (int _i51 = 0; _i51 < _list50.size; ++_i51) { - String _elem36; - _elem36 = iprot.readString(); - struct.software.add(_elem36); + String _elem52; + _elem52 = iprot.readString(); + struct.software.add(_elem52); } iprot.readListEnd(); } @@ -1144,9 +1144,9 @@ public class ImageVersionDetails implements org.apache.thrift.TBase(_list39.size); - for (int _i40 = 0; _i40 < _list39.size; ++_i40) + org.apache.thrift.protocol.TList _list55 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.software = new ArrayList(_list55.size); + for (int _i56 = 0; _i56 < _list55.size; ++_i56) { - String _elem41; - _elem41 = iprot.readString(); - struct.software.add(_elem41); + String _elem57; + _elem57 = iprot.readString(); + struct.software.add(_elem57); } } struct.setSoftwareIsSet(true); diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java b/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java index 6c2bbb1..65f493c 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java @@ -2087,13 +2087,13 @@ public class LectureRead implements org.apache.thrift.TBase(_list82.size); - for (int _i83 = 0; _i83 < _list82.size; ++_i83) + org.apache.thrift.protocol.TList _list106 = iprot.readListBegin(); + struct.nics = new ArrayList(_list106.size); + for (int _i107 = 0; _i107 < _list106.size; ++_i107) { - String _elem84; - _elem84 = iprot.readString(); - struct.nics.add(_elem84); + String _elem108; + _elem108 = iprot.readString(); + struct.nics.add(_elem108); } iprot.readListEnd(); } @@ -2105,13 +2105,13 @@ public class LectureRead implements org.apache.thrift.TBase(_list85.size); - for (int _i86 = 0; _i86 < _list85.size; ++_i86) + org.apache.thrift.protocol.TList _list109 = iprot.readListBegin(); + struct.allowedUsers = new ArrayList(_list109.size); + for (int _i110 = 0; _i110 < _list109.size; ++_i110) { - String _elem87; - _elem87 = iprot.readString(); - struct.allowedUsers.add(_elem87); + String _elem111; + _elem111 = iprot.readString(); + struct.allowedUsers.add(_elem111); } iprot.readListEnd(); } @@ -2123,14 +2123,14 @@ public class LectureRead implements org.apache.thrift.TBase(_list88.size); - for (int _i89 = 0; _i89 < _list88.size; ++_i89) + org.apache.thrift.protocol.TList _list112 = iprot.readListBegin(); + struct.networkExceptions = new ArrayList(_list112.size); + for (int _i113 = 0; _i113 < _list112.size; ++_i113) { - NetRule _elem90; - _elem90 = new NetRule(); - _elem90.read(iprot); - struct.networkExceptions.add(_elem90); + NetRule _elem114; + _elem114 = new NetRule(); + _elem114.read(iprot); + struct.networkExceptions.add(_elem114); } iprot.readListEnd(); } @@ -2245,9 +2245,9 @@ public class LectureRead implements org.apache.thrift.TBase(_list97.size); - for (int _i98 = 0; _i98 < _list97.size; ++_i98) + org.apache.thrift.protocol.TList _list121 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.nics = new ArrayList(_list121.size); + for (int _i122 = 0; _i122 < _list121.size; ++_i122) { - String _elem99; - _elem99 = iprot.readString(); - struct.nics.add(_elem99); + String _elem123; + _elem123 = iprot.readString(); + struct.nics.add(_elem123); } } struct.setNicsIsSet(true); } if (incoming.get(16)) { { - org.apache.thrift.protocol.TList _list100 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.allowedUsers = new ArrayList(_list100.size); - for (int _i101 = 0; _i101 < _list100.size; ++_i101) + org.apache.thrift.protocol.TList _list124 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.allowedUsers = new ArrayList(_list124.size); + for (int _i125 = 0; _i125 < _list124.size; ++_i125) { - String _elem102; - _elem102 = iprot.readString(); - struct.allowedUsers.add(_elem102); + String _elem126; + _elem126 = iprot.readString(); + struct.allowedUsers.add(_elem126); } } struct.setAllowedUsersIsSet(true); } if (incoming.get(17)) { { - org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.networkExceptions = new ArrayList(_list103.size); - for (int _i104 = 0; _i104 < _list103.size; ++_i104) + org.apache.thrift.protocol.TList _list127 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.networkExceptions = new ArrayList(_list127.size); + for (int _i128 = 0; _i128 < _list127.size; ++_i128) { - NetRule _elem105; - _elem105 = new NetRule(); - _elem105.read(iprot); - struct.networkExceptions.add(_elem105); + NetRule _elem129; + _elem129 = new NetRule(); + _elem129.read(iprot); + struct.networkExceptions.add(_elem129); } } struct.setNetworkExceptionsIsSet(true); diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java b/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java index 21917d6..3b9c52f 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java @@ -44,11 +44,12 @@ public class LectureWrite implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -65,11 +66,12 @@ public class LectureWrite implements org.apache.thrift.TBase nics; // required - public List allowedUsers; // optional public List networkExceptions; // optional public boolean isExam; // required public boolean hasInternetAccess; // required public LecturePermissions defaultPermissions; // required + public List addAllowedUsers; // optional + public List remAllowedUsers; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -82,11 +84,12 @@ public class LectureWrite implements org.apache.thrift.TBase byName = new HashMap(); @@ -119,8 +122,6 @@ public class LectureWrite implements org.apache.thrift.TBase metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -199,9 +204,6 @@ public class LectureWrite implements org.apache.thrift.TBase __this__nics = new ArrayList(other.nics); this.nics = __this__nics; } - if (other.isSetAllowedUsers()) { - List __this__allowedUsers = new ArrayList(other.allowedUsers); - this.allowedUsers = __this__allowedUsers; - } if (other.isSetNetworkExceptions()) { List __this__networkExceptions = new ArrayList(other.networkExceptions.size()); for (NetRule other_element : other.networkExceptions) { @@ -294,6 +298,14 @@ public class LectureWrite implements org.apache.thrift.TBase __this__addAllowedUsers = new ArrayList(other.addAllowedUsers); + this.addAllowedUsers = __this__addAllowedUsers; + } + if (other.isSetRemAllowedUsers()) { + List __this__remAllowedUsers = new ArrayList(other.remAllowedUsers); + this.remAllowedUsers = __this__remAllowedUsers; + } } public LectureWrite deepCopy() { @@ -315,13 +327,14 @@ public class LectureWrite implements org.apache.thrift.TBase getAllowedUsersIterator() { - return (this.allowedUsers == null) ? null : this.allowedUsers.iterator(); - } - - public void addToAllowedUsers(String elem) { - if (this.allowedUsers == null) { - this.allowedUsers = new ArrayList(); - } - this.allowedUsers.add(elem); - } - - public List getAllowedUsers() { - return this.allowedUsers; - } - - public LectureWrite setAllowedUsers(List allowedUsers) { - this.allowedUsers = allowedUsers; - return this; - } - - public void unsetAllowedUsers() { - this.allowedUsers = null; - } - - /** Returns true if field allowedUsers is set (has been assigned a value) and false otherwise */ - public boolean isSetAllowedUsers() { - return this.allowedUsers != null; - } - - public void setAllowedUsersIsSet(boolean value) { - if (!value) { - this.allowedUsers = null; - } - } - public int getNetworkExceptionsSize() { return (this.networkExceptions == null) ? 0 : this.networkExceptions.size(); } @@ -699,6 +673,84 @@ public class LectureWrite implements org.apache.thrift.TBase getAddAllowedUsersIterator() { + return (this.addAllowedUsers == null) ? null : this.addAllowedUsers.iterator(); + } + + public void addToAddAllowedUsers(String elem) { + if (this.addAllowedUsers == null) { + this.addAllowedUsers = new ArrayList(); + } + this.addAllowedUsers.add(elem); + } + + public List getAddAllowedUsers() { + return this.addAllowedUsers; + } + + public LectureWrite setAddAllowedUsers(List addAllowedUsers) { + this.addAllowedUsers = addAllowedUsers; + return this; + } + + public void unsetAddAllowedUsers() { + this.addAllowedUsers = null; + } + + /** Returns true if field addAllowedUsers is set (has been assigned a value) and false otherwise */ + public boolean isSetAddAllowedUsers() { + return this.addAllowedUsers != null; + } + + public void setAddAllowedUsersIsSet(boolean value) { + if (!value) { + this.addAllowedUsers = null; + } + } + + public int getRemAllowedUsersSize() { + return (this.remAllowedUsers == null) ? 0 : this.remAllowedUsers.size(); + } + + public java.util.Iterator getRemAllowedUsersIterator() { + return (this.remAllowedUsers == null) ? null : this.remAllowedUsers.iterator(); + } + + public void addToRemAllowedUsers(String elem) { + if (this.remAllowedUsers == null) { + this.remAllowedUsers = new ArrayList(); + } + this.remAllowedUsers.add(elem); + } + + public List getRemAllowedUsers() { + return this.remAllowedUsers; + } + + public LectureWrite setRemAllowedUsers(List remAllowedUsers) { + this.remAllowedUsers = remAllowedUsers; + return this; + } + + public void unsetRemAllowedUsers() { + this.remAllowedUsers = null; + } + + /** Returns true if field remAllowedUsers is set (has been assigned a value) and false otherwise */ + public boolean isSetRemAllowedUsers() { + return this.remAllowedUsers != null; + } + + public void setRemAllowedUsersIsSet(boolean value) { + if (!value) { + this.remAllowedUsers = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case LECTURE_NAME: @@ -773,14 +825,6 @@ public class LectureWrite implements org.apache.thrift.TBase)value); - } - break; - case NETWORK_EXCEPTIONS: if (value == null) { unsetNetworkExceptions(); @@ -813,6 +857,22 @@ public class LectureWrite implements org.apache.thrift.TBase)value); + } + break; + + case REM_ALLOWED_USERS: + if (value == null) { + unsetRemAllowedUsers(); + } else { + setRemAllowedUsers((List)value); + } + break; + } } @@ -845,9 +905,6 @@ public class LectureWrite implements org.apache.thrift.TBase(_list58.size); - for (int _i59 = 0; _i59 < _list58.size; ++_i59) + org.apache.thrift.protocol.TList _list74 = iprot.readListBegin(); + struct.nics = new ArrayList(_list74.size); + for (int _i75 = 0; _i75 < _list74.size; ++_i75) { - String _elem60; - _elem60 = iprot.readString(); - struct.nics.add(_elem60); + String _elem76; + _elem76 = iprot.readString(); + struct.nics.add(_elem76); } iprot.readListEnd(); } @@ -1439,35 +1533,17 @@ public class LectureWrite implements org.apache.thrift.TBase(_list61.size); - for (int _i62 = 0; _i62 < _list61.size; ++_i62) - { - String _elem63; - _elem63 = iprot.readString(); - struct.allowedUsers.add(_elem63); - } - iprot.readListEnd(); - } - struct.setAllowedUsersIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; case 12: // NETWORK_EXCEPTIONS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list64 = iprot.readListBegin(); - struct.networkExceptions = new ArrayList(_list64.size); - for (int _i65 = 0; _i65 < _list64.size; ++_i65) + org.apache.thrift.protocol.TList _list77 = iprot.readListBegin(); + struct.networkExceptions = new ArrayList(_list77.size); + for (int _i78 = 0; _i78 < _list77.size; ++_i78) { - NetRule _elem66; - _elem66 = new NetRule(); - _elem66.read(iprot); - struct.networkExceptions.add(_elem66); + NetRule _elem79; + _elem79 = new NetRule(); + _elem79.read(iprot); + struct.networkExceptions.add(_elem79); } iprot.readListEnd(); } @@ -1501,6 +1577,42 @@ public class LectureWrite implements org.apache.thrift.TBase(_list80.size); + for (int _i81 = 0; _i81 < _list80.size; ++_i81) + { + String _elem82; + _elem82 = iprot.readString(); + struct.addAllowedUsers.add(_elem82); + } + iprot.readListEnd(); + } + struct.setAddAllowedUsersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 16: // REM_ALLOWED_USERS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list83 = iprot.readListBegin(); + struct.remAllowedUsers = new ArrayList(_list83.size); + for (int _i84 = 0; _i84 < _list83.size; ++_i84) + { + String _elem85; + _elem85 = iprot.readString(); + struct.remAllowedUsers.add(_elem85); + } + iprot.readListEnd(); + } + struct.setRemAllowedUsersIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1552,22 +1664,22 @@ public class LectureWrite implements org.apache.thrift.TBase(_list73.size); - for (int _i74 = 0; _i74 < _list73.size; ++_i74) + org.apache.thrift.protocol.TList _list94 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.nics = new ArrayList(_list94.size); + for (int _i95 = 0; _i95 < _list94.size; ++_i95) { - String _elem75; - _elem75 = iprot.readString(); - struct.nics.add(_elem75); + String _elem96; + _elem96 = iprot.readString(); + struct.nics.add(_elem96); } } struct.setNicsIsSet(true); } if (incoming.get(9)) { { - org.apache.thrift.protocol.TList _list76 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.allowedUsers = new ArrayList(_list76.size); - for (int _i77 = 0; _i77 < _list76.size; ++_i77) - { - String _elem78; - _elem78 = iprot.readString(); - struct.allowedUsers.add(_elem78); - } - } - struct.setAllowedUsersIsSet(true); - } - if (incoming.get(10)) { - { - org.apache.thrift.protocol.TList _list79 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.networkExceptions = new ArrayList(_list79.size); - for (int _i80 = 0; _i80 < _list79.size; ++_i80) + org.apache.thrift.protocol.TList _list97 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.networkExceptions = new ArrayList(_list97.size); + for (int _i98 = 0; _i98 < _list97.size; ++_i98) { - NetRule _elem81; - _elem81 = new NetRule(); - _elem81.read(iprot); - struct.networkExceptions.add(_elem81); + NetRule _elem99; + _elem99 = new NetRule(); + _elem99.read(iprot); + struct.networkExceptions.add(_elem99); } } struct.setNetworkExceptionsIsSet(true); } - if (incoming.get(11)) { + if (incoming.get(10)) { struct.isExam = iprot.readBool(); struct.setIsExamIsSet(true); } - if (incoming.get(12)) { + if (incoming.get(11)) { struct.hasInternetAccess = iprot.readBool(); struct.setHasInternetAccessIsSet(true); } - if (incoming.get(13)) { + if (incoming.get(12)) { struct.defaultPermissions = new LecturePermissions(); struct.defaultPermissions.read(iprot); struct.setDefaultPermissionsIsSet(true); } + if (incoming.get(13)) { + { + org.apache.thrift.protocol.TList _list100 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.addAllowedUsers = new ArrayList(_list100.size); + for (int _i101 = 0; _i101 < _list100.size; ++_i101) + { + String _elem102; + _elem102 = iprot.readString(); + struct.addAllowedUsers.add(_elem102); + } + } + struct.setAddAllowedUsersIsSet(true); + } + if (incoming.get(14)) { + { + org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.remAllowedUsers = new ArrayList(_list103.size); + for (int _i104 = 0; _i104 < _list103.size; ++_i104) + { + String _elem105; + _elem105 = iprot.readString(); + struct.remAllowedUsers.add(_elem105); + } + } + struct.setRemAllowedUsersIsSet(true); + } } } diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java b/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java index 052d3fb..8ea6981 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java @@ -62,11 +62,15 @@ public class MasterServer { public boolean updateSatelliteAddress(String serverSessionId, String address) throws org.apache.thrift.TException; - public List getOrganizations() throws org.apache.thrift.TException; + public List getOrganizations() throws TInternalServerError, org.apache.thrift.TException; - public List getOperatingSystems() throws org.apache.thrift.TException; + public List getOperatingSystems() throws TInternalServerError, org.apache.thrift.TException; - public List getVirtualizers() throws org.apache.thrift.TException; + public List getVirtualizers() throws TInternalServerError, org.apache.thrift.TException; + + public List getTags(long startDate) throws TInternalServerError, org.apache.thrift.TException; + + public List getSoftware(long startDate) throws TInternalServerError, org.apache.thrift.TException; } @@ -104,6 +108,10 @@ public class MasterServer { public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getTags(long startDate, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getSoftware(long startDate, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + } public static class Client extends org.apache.thrift.TServiceClient implements Iface { @@ -473,7 +481,7 @@ public class MasterServer { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateSatelliteAddress failed: unknown result"); } - public List getOrganizations() throws org.apache.thrift.TException + public List getOrganizations() throws TInternalServerError, org.apache.thrift.TException { send_getOrganizations(); return recv_getOrganizations(); @@ -485,17 +493,20 @@ public class MasterServer { sendBase("getOrganizations", args); } - public List recv_getOrganizations() throws org.apache.thrift.TException + public List recv_getOrganizations() throws TInternalServerError, org.apache.thrift.TException { getOrganizations_result result = new getOrganizations_result(); receiveBase(result, "getOrganizations"); if (result.isSetSuccess()) { return result.success; } + if (result.serverError != null) { + throw result.serverError; + } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOrganizations failed: unknown result"); } - public List getOperatingSystems() throws org.apache.thrift.TException + public List getOperatingSystems() throws TInternalServerError, org.apache.thrift.TException { send_getOperatingSystems(); return recv_getOperatingSystems(); @@ -507,17 +518,20 @@ public class MasterServer { sendBase("getOperatingSystems", args); } - public List recv_getOperatingSystems() throws org.apache.thrift.TException + public List recv_getOperatingSystems() throws TInternalServerError, org.apache.thrift.TException { getOperatingSystems_result result = new getOperatingSystems_result(); receiveBase(result, "getOperatingSystems"); if (result.isSetSuccess()) { return result.success; } + if (result.serverError != null) { + throw result.serverError; + } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOperatingSystems failed: unknown result"); } - public List getVirtualizers() throws org.apache.thrift.TException + public List getVirtualizers() throws TInternalServerError, org.apache.thrift.TException { send_getVirtualizers(); return recv_getVirtualizers(); @@ -529,16 +543,71 @@ public class MasterServer { sendBase("getVirtualizers", args); } - public List recv_getVirtualizers() throws org.apache.thrift.TException + public List recv_getVirtualizers() throws TInternalServerError, org.apache.thrift.TException { getVirtualizers_result result = new getVirtualizers_result(); receiveBase(result, "getVirtualizers"); if (result.isSetSuccess()) { return result.success; } + if (result.serverError != null) { + throw result.serverError; + } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVirtualizers failed: unknown result"); } + public List getTags(long startDate) throws TInternalServerError, org.apache.thrift.TException + { + send_getTags(startDate); + return recv_getTags(); + } + + public void send_getTags(long startDate) throws org.apache.thrift.TException + { + getTags_args args = new getTags_args(); + args.setStartDate(startDate); + sendBase("getTags", args); + } + + public List recv_getTags() throws TInternalServerError, org.apache.thrift.TException + { + getTags_result result = new getTags_result(); + receiveBase(result, "getTags"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.serverError != null) { + throw result.serverError; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTags failed: unknown result"); + } + + public List getSoftware(long startDate) throws TInternalServerError, org.apache.thrift.TException + { + send_getSoftware(startDate); + return recv_getSoftware(); + } + + public void send_getSoftware(long startDate) throws org.apache.thrift.TException + { + getSoftware_args args = new getSoftware_args(); + args.setStartDate(startDate); + sendBase("getSoftware", args); + } + + public List recv_getSoftware() throws TInternalServerError, org.apache.thrift.TException + { + getSoftware_result result = new getSoftware_result(); + receiveBase(result, "getSoftware"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.serverError != null) { + throw result.serverError; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSoftware failed: unknown result"); + } + } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { @@ -1028,7 +1097,7 @@ public class MasterServer { prot.writeMessageEnd(); } - public List getResult() throws org.apache.thrift.TException { + public List getResult() throws TInternalServerError, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -1057,7 +1126,7 @@ public class MasterServer { prot.writeMessageEnd(); } - public List getResult() throws org.apache.thrift.TException { + public List getResult() throws TInternalServerError, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -1086,7 +1155,7 @@ public class MasterServer { prot.writeMessageEnd(); } - public List getResult() throws org.apache.thrift.TException { + public List getResult() throws TInternalServerError, org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } @@ -1096,6 +1165,70 @@ public class MasterServer { } } + public void getTags(long startDate, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getTags_call method_call = new getTags_call(startDate, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getTags_call extends org.apache.thrift.async.TAsyncMethodCall { + private long startDate; + public getTags_call(long startDate, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.startDate = startDate; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTags", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getTags_args args = new getTags_args(); + args.setStartDate(startDate); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws TInternalServerError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getTags(); + } + } + + public void getSoftware(long startDate, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getSoftware_call method_call = new getSoftware_call(startDate, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getSoftware_call extends org.apache.thrift.async.TAsyncMethodCall { + private long startDate; + public getSoftware_call(long startDate, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.startDate = startDate; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSoftware", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getSoftware_args args = new getSoftware_args(); + args.setStartDate(startDate); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws TInternalServerError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getSoftware(); + } + } + } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { @@ -1125,6 +1258,8 @@ public class MasterServer { processMap.put("getOrganizations", new getOrganizations()); processMap.put("getOperatingSystems", new getOperatingSystems()); processMap.put("getVirtualizers", new getVirtualizers()); + processMap.put("getTags", new getTags()); + processMap.put("getSoftware", new getSoftware()); return processMap; } @@ -1449,7 +1584,11 @@ public class MasterServer { public getOrganizations_result getResult(I iface, getOrganizations_args args) throws org.apache.thrift.TException { getOrganizations_result result = new getOrganizations_result(); - result.success = iface.getOrganizations(); + try { + result.success = iface.getOrganizations(); + } catch (TInternalServerError serverError) { + result.serverError = serverError; + } return result; } } @@ -1469,7 +1608,11 @@ public class MasterServer { public getOperatingSystems_result getResult(I iface, getOperatingSystems_args args) throws org.apache.thrift.TException { getOperatingSystems_result result = new getOperatingSystems_result(); - result.success = iface.getOperatingSystems(); + try { + result.success = iface.getOperatingSystems(); + } catch (TInternalServerError serverError) { + result.serverError = serverError; + } return result; } } @@ -1489,7 +1632,59 @@ public class MasterServer { public getVirtualizers_result getResult(I iface, getVirtualizers_args args) throws org.apache.thrift.TException { getVirtualizers_result result = new getVirtualizers_result(); - result.success = iface.getVirtualizers(); + try { + result.success = iface.getVirtualizers(); + } catch (TInternalServerError serverError) { + result.serverError = serverError; + } + return result; + } + } + + public static class getTags extends org.apache.thrift.ProcessFunction { + public getTags() { + super("getTags"); + } + + public getTags_args getEmptyArgsInstance() { + return new getTags_args(); + } + + protected boolean isOneway() { + return false; + } + + public getTags_result getResult(I iface, getTags_args args) throws org.apache.thrift.TException { + getTags_result result = new getTags_result(); + try { + result.success = iface.getTags(args.startDate); + } catch (TInternalServerError serverError) { + result.serverError = serverError; + } + return result; + } + } + + public static class getSoftware extends org.apache.thrift.ProcessFunction { + public getSoftware() { + super("getSoftware"); + } + + public getSoftware_args getEmptyArgsInstance() { + return new getSoftware_args(); + } + + protected boolean isOneway() { + return false; + } + + public getSoftware_result getResult(I iface, getSoftware_args args) throws org.apache.thrift.TException { + getSoftware_result result = new getSoftware_result(); + try { + result.success = iface.getSoftware(args.startDate); + } catch (TInternalServerError serverError) { + result.serverError = serverError; + } return result; } } @@ -1523,6 +1718,8 @@ public class MasterServer { processMap.put("getOrganizations", new getOrganizations()); processMap.put("getOperatingSystems", new getOperatingSystems()); processMap.put("getVirtualizers", new getVirtualizers()); + processMap.put("getTags", new getTags()); + processMap.put("getSoftware", new getSoftware()); return processMap; } @@ -2289,6 +2486,12 @@ public class MasterServer { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getOrganizations_result result = new getOrganizations_result(); + if (e instanceof TInternalServerError) { + result.serverError = (TInternalServerError) e; + result.setServerErrorIsSet(true); + msg = result; + } + else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); @@ -2340,6 +2543,12 @@ public class MasterServer { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getOperatingSystems_result result = new getOperatingSystems_result(); + if (e instanceof TInternalServerError) { + result.serverError = (TInternalServerError) e; + result.setServerErrorIsSet(true); + msg = result; + } + else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); @@ -2391,6 +2600,12 @@ public class MasterServer { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; getVirtualizers_result result = new getVirtualizers_result(); + if (e instanceof TInternalServerError) { + result.serverError = (TInternalServerError) e; + result.setServerErrorIsSet(true); + msg = result; + } + else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); @@ -2415,6 +2630,120 @@ public class MasterServer { } } + public static class getTags extends org.apache.thrift.AsyncProcessFunction> { + public getTags() { + super("getTags"); + } + + public getTags_args getEmptyArgsInstance() { + return new getTags_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getTags_result result = new getTags_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getTags_result result = new getTags_result(); + if (e instanceof TInternalServerError) { + result.serverError = (TInternalServerError) e; + result.setServerErrorIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getTags_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getTags(args.startDate,resultHandler); + } + } + + public static class getSoftware extends org.apache.thrift.AsyncProcessFunction> { + public getSoftware() { + super("getSoftware"); + } + + public getSoftware_args getEmptyArgsInstance() { + return new getSoftware_args(); + } + + public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback>() { + public void onComplete(List o) { + getSoftware_result result = new getSoftware_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + getSoftware_result result = new getSoftware_result(); + if (e instanceof TInternalServerError) { + result.serverError = (TInternalServerError) e; + result.setServerErrorIsSet(true); + msg = result; + } + else + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getSoftware_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { + iface.getSoftware(args.startDate,resultHandler); + } + } + } public static class ping_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { @@ -5787,14 +6116,14 @@ public class MasterServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list210 = iprot.readListBegin(); - struct.success = new ArrayList(_list210.size); - for (int _i211 = 0; _i211 < _list210.size; ++_i211) + org.apache.thrift.protocol.TList _list234 = iprot.readListBegin(); + struct.success = new ArrayList(_list234.size); + for (int _i235 = 0; _i235 < _list234.size; ++_i235) { - UserInfo _elem212; - _elem212 = new UserInfo(); - _elem212.read(iprot); - struct.success.add(_elem212); + UserInfo _elem236; + _elem236 = new UserInfo(); + _elem236.read(iprot); + struct.success.add(_elem236); } iprot.readListEnd(); } @@ -5831,9 +6160,9 @@ public class MasterServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (UserInfo _iter213 : struct.success) + for (UserInfo _iter237 : struct.success) { - _iter213.write(oprot); + _iter237.write(oprot); } oprot.writeListEnd(); } @@ -5872,9 +6201,9 @@ public class MasterServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (UserInfo _iter214 : struct.success) + for (UserInfo _iter238 : struct.success) { - _iter214.write(oprot); + _iter238.write(oprot); } } } @@ -5889,14 +6218,14 @@ public class MasterServer { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list215 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list215.size); - for (int _i216 = 0; _i216 < _list215.size; ++_i216) + org.apache.thrift.protocol.TList _list239 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list239.size); + for (int _i240 = 0; _i240 < _list239.size; ++_i240) { - UserInfo _elem217; - _elem217 = new UserInfo(); - _elem217.read(iprot); - struct.success.add(_elem217); + UserInfo _elem241; + _elem241 = new UserInfo(); + _elem241.read(iprot); + struct.success.add(_elem241); } } struct.setSuccessIsSet(true); @@ -6749,14 +7078,14 @@ public class MasterServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list218 = iprot.readListBegin(); - struct.success = new ArrayList(_list218.size); - for (int _i219 = 0; _i219 < _list218.size; ++_i219) + org.apache.thrift.protocol.TList _list242 = iprot.readListBegin(); + struct.success = new ArrayList(_list242.size); + for (int _i243 = 0; _i243 < _list242.size; ++_i243) { - ImagePublishData _elem220; - _elem220 = new ImagePublishData(); - _elem220.read(iprot); - struct.success.add(_elem220); + ImagePublishData _elem244; + _elem244 = new ImagePublishData(); + _elem244.read(iprot); + struct.success.add(_elem244); } iprot.readListEnd(); } @@ -6793,9 +7122,9 @@ public class MasterServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (ImagePublishData _iter221 : struct.success) + for (ImagePublishData _iter245 : struct.success) { - _iter221.write(oprot); + _iter245.write(oprot); } oprot.writeListEnd(); } @@ -6834,9 +7163,9 @@ public class MasterServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (ImagePublishData _iter222 : struct.success) + for (ImagePublishData _iter246 : struct.success) { - _iter222.write(oprot); + _iter246.write(oprot); } } } @@ -6851,14 +7180,14 @@ public class MasterServer { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list223 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list223.size); - for (int _i224 = 0; _i224 < _list223.size; ++_i224) + org.apache.thrift.protocol.TList _list247 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list247.size); + for (int _i248 = 0; _i248 < _list247.size; ++_i248) { - ImagePublishData _elem225; - _elem225 = new ImagePublishData(); - _elem225.read(iprot); - struct.success.add(_elem225); + ImagePublishData _elem249; + _elem249 = new ImagePublishData(); + _elem249.read(iprot); + struct.success.add(_elem249); } } struct.setSuccessIsSet(true); @@ -10623,13 +10952,13 @@ public class MasterServer { case 3: // BLOCK_HASHES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list226 = iprot.readListBegin(); - struct.blockHashes = new ArrayList(_list226.size); - for (int _i227 = 0; _i227 < _list226.size; ++_i227) + org.apache.thrift.protocol.TList _list250 = iprot.readListBegin(); + struct.blockHashes = new ArrayList(_list250.size); + for (int _i251 = 0; _i251 < _list250.size; ++_i251) { - ByteBuffer _elem228; - _elem228 = iprot.readBinary(); - struct.blockHashes.add(_elem228); + ByteBuffer _elem252; + _elem252 = iprot.readBinary(); + struct.blockHashes.add(_elem252); } iprot.readListEnd(); } @@ -10667,9 +10996,9 @@ public class MasterServer { oprot.writeFieldBegin(BLOCK_HASHES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.blockHashes.size())); - for (ByteBuffer _iter229 : struct.blockHashes) + for (ByteBuffer _iter253 : struct.blockHashes) { - oprot.writeBinary(_iter229); + oprot.writeBinary(_iter253); } oprot.writeListEnd(); } @@ -10712,9 +11041,9 @@ public class MasterServer { if (struct.isSetBlockHashes()) { { oprot.writeI32(struct.blockHashes.size()); - for (ByteBuffer _iter230 : struct.blockHashes) + for (ByteBuffer _iter254 : struct.blockHashes) { - oprot.writeBinary(_iter230); + oprot.writeBinary(_iter254); } } } @@ -10735,13 +11064,13 @@ public class MasterServer { } if (incoming.get(2)) { { - org.apache.thrift.protocol.TList _list231 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.blockHashes = new ArrayList(_list231.size); - for (int _i232 = 0; _i232 < _list231.size; ++_i232) + org.apache.thrift.protocol.TList _list255 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.blockHashes = new ArrayList(_list255.size); + for (int _i256 = 0; _i256 < _list255.size; ++_i256) { - ByteBuffer _elem233; - _elem233 = iprot.readBinary(); - struct.blockHashes.add(_elem233); + ByteBuffer _elem257; + _elem257 = iprot.readBinary(); + struct.blockHashes.add(_elem257); } } struct.setBlockHashesIsSet(true); @@ -14499,6 +14828,7 @@ public class MasterServer { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOrganizations_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -14507,10 +14837,12 @@ public class MasterServer { } public List success; // required + public TInternalServerError serverError; // 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 { - SUCCESS((short)0, "success"); + SUCCESS((short)0, "success"), + SERVER_ERROR((short)1, "serverError"); private static final Map byName = new HashMap(); @@ -14527,6 +14859,8 @@ public class MasterServer { switch(fieldId) { case 0: // SUCCESS return SUCCESS; + case 1: // SERVER_ERROR + return SERVER_ERROR; default: return null; } @@ -14573,6 +14907,8 @@ public class MasterServer { tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Organization.class)))); + tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOrganizations_result.class, metaDataMap); } @@ -14581,10 +14917,12 @@ public class MasterServer { } public getOrganizations_result( - List success) + List success, + TInternalServerError serverError) { this(); this.success = success; + this.serverError = serverError; } /** @@ -14598,6 +14936,9 @@ public class MasterServer { } this.success = __this__success; } + if (other.isSetServerError()) { + this.serverError = new TInternalServerError(other.serverError); + } } public getOrganizations_result deepCopy() { @@ -14607,6 +14948,7 @@ public class MasterServer { @Override public void clear() { this.success = null; + this.serverError = null; } public int getSuccessSize() { @@ -14648,6 +14990,30 @@ public class MasterServer { } } + public TInternalServerError getServerError() { + return this.serverError; + } + + public getOrganizations_result setServerError(TInternalServerError serverError) { + this.serverError = serverError; + return this; + } + + public void unsetServerError() { + this.serverError = null; + } + + /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ + public boolean isSetServerError() { + return this.serverError != null; + } + + public void setServerErrorIsSet(boolean value) { + if (!value) { + this.serverError = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: @@ -14658,6 +15024,14 @@ public class MasterServer { } break; + case SERVER_ERROR: + if (value == null) { + unsetServerError(); + } else { + setServerError((TInternalServerError)value); + } + break; + } } @@ -14666,6 +15040,9 @@ public class MasterServer { case SUCCESS: return getSuccess(); + case SERVER_ERROR: + return getServerError(); + } throw new IllegalStateException(); } @@ -14679,6 +15056,8 @@ public class MasterServer { switch (field) { case SUCCESS: return isSetSuccess(); + case SERVER_ERROR: + return isSetServerError(); } throw new IllegalStateException(); } @@ -14705,6 +15084,15 @@ public class MasterServer { return false; } + boolean this_present_serverError = true && this.isSetServerError(); + boolean that_present_serverError = true && that.isSetServerError(); + if (this_present_serverError || that_present_serverError) { + if (!(this_present_serverError && that_present_serverError)) + return false; + if (!this.serverError.equals(that.serverError)) + return false; + } + return true; } @@ -14731,10 +15119,20 @@ public class MasterServer { return lastComparison; } } - return 0; - } - - public _Fields fieldForId(int fieldId) { + lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetServerError()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } @@ -14758,6 +15156,14 @@ public class MasterServer { sb.append(this.success); } first = false; + if (!first) sb.append(", "); + sb.append("serverError:"); + if (this.serverError == null) { + sb.append("null"); + } else { + sb.append(this.serverError); + } + first = false; sb.append(")"); return sb.toString(); } @@ -14804,14 +15210,14 @@ public class MasterServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list234 = iprot.readListBegin(); - struct.success = new ArrayList(_list234.size); - for (int _i235 = 0; _i235 < _list234.size; ++_i235) + org.apache.thrift.protocol.TList _list258 = iprot.readListBegin(); + struct.success = new ArrayList(_list258.size); + for (int _i259 = 0; _i259 < _list258.size; ++_i259) { - Organization _elem236; - _elem236 = new Organization(); - _elem236.read(iprot); - struct.success.add(_elem236); + Organization _elem260; + _elem260 = new Organization(); + _elem260.read(iprot); + struct.success.add(_elem260); } iprot.readListEnd(); } @@ -14820,6 +15226,15 @@ public class MasterServer { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 1: // SERVER_ERROR + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.serverError = new TInternalServerError(); + struct.serverError.read(iprot); + struct.setServerErrorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -14839,14 +15254,19 @@ public class MasterServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Organization _iter237 : struct.success) + for (Organization _iter261 : struct.success) { - _iter237.write(oprot); + _iter261.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } + if (struct.serverError != null) { + oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); + struct.serverError.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -14868,36 +15288,47 @@ public class MasterServer { if (struct.isSetSuccess()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); + if (struct.isSetServerError()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Organization _iter238 : struct.success) + for (Organization _iter262 : struct.success) { - _iter238.write(oprot); + _iter262.write(oprot); } } } + if (struct.isSetServerError()) { + struct.serverError.write(oprot); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getOrganizations_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list239 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list239.size); - for (int _i240 = 0; _i240 < _list239.size; ++_i240) + org.apache.thrift.protocol.TList _list263 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list263.size); + for (int _i264 = 0; _i264 < _list263.size; ++_i264) { - Organization _elem241; - _elem241 = new Organization(); - _elem241.read(iprot); - struct.success.add(_elem241); + Organization _elem265; + _elem265 = new Organization(); + _elem265.read(iprot); + struct.success.add(_elem265); } } struct.setSuccessIsSet(true); } + if (incoming.get(1)) { + struct.serverError = new TInternalServerError(); + struct.serverError.read(iprot); + struct.setServerErrorIsSet(true); + } } } @@ -15153,6 +15584,7 @@ public class MasterServer { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOperatingSystems_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -15161,10 +15593,12 @@ public class MasterServer { } public List success; // required + public TInternalServerError serverError; // 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 { - SUCCESS((short)0, "success"); + SUCCESS((short)0, "success"), + SERVER_ERROR((short)1, "serverError"); private static final Map byName = new HashMap(); @@ -15181,6 +15615,8 @@ public class MasterServer { switch(fieldId) { case 0: // SUCCESS return SUCCESS; + case 1: // SERVER_ERROR + return SERVER_ERROR; default: return null; } @@ -15227,6 +15663,8 @@ public class MasterServer { tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OperatingSystem.class)))); + tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOperatingSystems_result.class, metaDataMap); } @@ -15235,10 +15673,12 @@ public class MasterServer { } public getOperatingSystems_result( - List success) + List success, + TInternalServerError serverError) { this(); this.success = success; + this.serverError = serverError; } /** @@ -15252,6 +15692,9 @@ public class MasterServer { } this.success = __this__success; } + if (other.isSetServerError()) { + this.serverError = new TInternalServerError(other.serverError); + } } public getOperatingSystems_result deepCopy() { @@ -15261,6 +15704,7 @@ public class MasterServer { @Override public void clear() { this.success = null; + this.serverError = null; } public int getSuccessSize() { @@ -15302,6 +15746,30 @@ public class MasterServer { } } + public TInternalServerError getServerError() { + return this.serverError; + } + + public getOperatingSystems_result setServerError(TInternalServerError serverError) { + this.serverError = serverError; + return this; + } + + public void unsetServerError() { + this.serverError = null; + } + + /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ + public boolean isSetServerError() { + return this.serverError != null; + } + + public void setServerErrorIsSet(boolean value) { + if (!value) { + this.serverError = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: @@ -15312,6 +15780,14 @@ public class MasterServer { } break; + case SERVER_ERROR: + if (value == null) { + unsetServerError(); + } else { + setServerError((TInternalServerError)value); + } + break; + } } @@ -15320,6 +15796,9 @@ public class MasterServer { case SUCCESS: return getSuccess(); + case SERVER_ERROR: + return getServerError(); + } throw new IllegalStateException(); } @@ -15333,6 +15812,8 @@ public class MasterServer { switch (field) { case SUCCESS: return isSetSuccess(); + case SERVER_ERROR: + return isSetServerError(); } throw new IllegalStateException(); } @@ -15359,6 +15840,15 @@ public class MasterServer { return false; } + boolean this_present_serverError = true && this.isSetServerError(); + boolean that_present_serverError = true && that.isSetServerError(); + if (this_present_serverError || that_present_serverError) { + if (!(this_present_serverError && that_present_serverError)) + return false; + if (!this.serverError.equals(that.serverError)) + return false; + } + return true; } @@ -15385,6 +15875,16 @@ public class MasterServer { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetServerError()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -15412,6 +15912,14 @@ public class MasterServer { sb.append(this.success); } first = false; + if (!first) sb.append(", "); + sb.append("serverError:"); + if (this.serverError == null) { + sb.append("null"); + } else { + sb.append(this.serverError); + } + first = false; sb.append(")"); return sb.toString(); } @@ -15458,14 +15966,14 @@ public class MasterServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list242 = iprot.readListBegin(); - struct.success = new ArrayList(_list242.size); - for (int _i243 = 0; _i243 < _list242.size; ++_i243) + org.apache.thrift.protocol.TList _list266 = iprot.readListBegin(); + struct.success = new ArrayList(_list266.size); + for (int _i267 = 0; _i267 < _list266.size; ++_i267) { - OperatingSystem _elem244; - _elem244 = new OperatingSystem(); - _elem244.read(iprot); - struct.success.add(_elem244); + OperatingSystem _elem268; + _elem268 = new OperatingSystem(); + _elem268.read(iprot); + struct.success.add(_elem268); } iprot.readListEnd(); } @@ -15474,6 +15982,15 @@ public class MasterServer { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 1: // SERVER_ERROR + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.serverError = new TInternalServerError(); + struct.serverError.read(iprot); + struct.setServerErrorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -15493,14 +16010,19 @@ public class MasterServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (OperatingSystem _iter245 : struct.success) + for (OperatingSystem _iter269 : struct.success) { - _iter245.write(oprot); + _iter269.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } + if (struct.serverError != null) { + oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); + struct.serverError.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -15522,36 +16044,47 @@ public class MasterServer { if (struct.isSetSuccess()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); + if (struct.isSetServerError()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (OperatingSystem _iter246 : struct.success) + for (OperatingSystem _iter270 : struct.success) { - _iter246.write(oprot); + _iter270.write(oprot); } } } + if (struct.isSetServerError()) { + struct.serverError.write(oprot); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list247 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list247.size); - for (int _i248 = 0; _i248 < _list247.size; ++_i248) + org.apache.thrift.protocol.TList _list271 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list271.size); + for (int _i272 = 0; _i272 < _list271.size; ++_i272) { - OperatingSystem _elem249; - _elem249 = new OperatingSystem(); - _elem249.read(iprot); - struct.success.add(_elem249); + OperatingSystem _elem273; + _elem273 = new OperatingSystem(); + _elem273.read(iprot); + struct.success.add(_elem273); } } struct.setSuccessIsSet(true); } + if (incoming.get(1)) { + struct.serverError = new TInternalServerError(); + struct.serverError.read(iprot); + struct.setServerErrorIsSet(true); + } } } @@ -15807,6 +16340,7 @@ public class MasterServer { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVirtualizers_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -15815,10 +16349,12 @@ public class MasterServer { } public List success; // required + public TInternalServerError serverError; // 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 { - SUCCESS((short)0, "success"); + SUCCESS((short)0, "success"), + SERVER_ERROR((short)1, "serverError"); private static final Map byName = new HashMap(); @@ -15835,6 +16371,8 @@ public class MasterServer { switch(fieldId) { case 0: // SUCCESS return SUCCESS; + case 1: // SERVER_ERROR + return SERVER_ERROR; default: return null; } @@ -15881,6 +16419,8 @@ public class MasterServer { tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Virtualizer.class)))); + tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVirtualizers_result.class, metaDataMap); } @@ -15889,10 +16429,12 @@ public class MasterServer { } public getVirtualizers_result( - List success) + List success, + TInternalServerError serverError) { this(); this.success = success; + this.serverError = serverError; } /** @@ -15906,6 +16448,9 @@ public class MasterServer { } this.success = __this__success; } + if (other.isSetServerError()) { + this.serverError = new TInternalServerError(other.serverError); + } } public getVirtualizers_result deepCopy() { @@ -15915,6 +16460,7 @@ public class MasterServer { @Override public void clear() { this.success = null; + this.serverError = null; } public int getSuccessSize() { @@ -15956,6 +16502,30 @@ public class MasterServer { } } + public TInternalServerError getServerError() { + return this.serverError; + } + + public getVirtualizers_result setServerError(TInternalServerError serverError) { + this.serverError = serverError; + return this; + } + + public void unsetServerError() { + this.serverError = null; + } + + /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ + public boolean isSetServerError() { + return this.serverError != null; + } + + public void setServerErrorIsSet(boolean value) { + if (!value) { + this.serverError = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: @@ -15966,6 +16536,14 @@ public class MasterServer { } break; + case SERVER_ERROR: + if (value == null) { + unsetServerError(); + } else { + setServerError((TInternalServerError)value); + } + break; + } } @@ -15974,6 +16552,9 @@ public class MasterServer { case SUCCESS: return getSuccess(); + case SERVER_ERROR: + return getServerError(); + } throw new IllegalStateException(); } @@ -15987,6 +16568,8 @@ public class MasterServer { switch (field) { case SUCCESS: return isSetSuccess(); + case SERVER_ERROR: + return isSetServerError(); } throw new IllegalStateException(); } @@ -16013,6 +16596,15 @@ public class MasterServer { return false; } + boolean this_present_serverError = true && this.isSetServerError(); + boolean that_present_serverError = true && that.isSetServerError(); + if (this_present_serverError || that_present_serverError) { + if (!(this_present_serverError && that_present_serverError)) + return false; + if (!this.serverError.equals(that.serverError)) + return false; + } + return true; } @@ -16039,6 +16631,16 @@ public class MasterServer { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetServerError()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -16066,6 +16668,14 @@ public class MasterServer { sb.append(this.success); } first = false; + if (!first) sb.append(", "); + sb.append("serverError:"); + if (this.serverError == null) { + sb.append("null"); + } else { + sb.append(this.serverError); + } + first = false; sb.append(")"); return sb.toString(); } @@ -16112,14 +16722,14 @@ public class MasterServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list250 = iprot.readListBegin(); - struct.success = new ArrayList(_list250.size); - for (int _i251 = 0; _i251 < _list250.size; ++_i251) + org.apache.thrift.protocol.TList _list274 = iprot.readListBegin(); + struct.success = new ArrayList(_list274.size); + for (int _i275 = 0; _i275 < _list274.size; ++_i275) { - Virtualizer _elem252; - _elem252 = new Virtualizer(); - _elem252.read(iprot); - struct.success.add(_elem252); + Virtualizer _elem276; + _elem276 = new Virtualizer(); + _elem276.read(iprot); + struct.success.add(_elem276); } iprot.readListEnd(); } @@ -16128,6 +16738,15 @@ public class MasterServer { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 1: // SERVER_ERROR + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.serverError = new TInternalServerError(); + struct.serverError.read(iprot); + struct.setServerErrorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -16147,14 +16766,19 @@ public class MasterServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Virtualizer _iter253 : struct.success) + for (Virtualizer _iter277 : struct.success) { - _iter253.write(oprot); + _iter277.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } + if (struct.serverError != null) { + oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); + struct.serverError.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -16176,36 +16800,1771 @@ public class MasterServer { if (struct.isSetSuccess()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); + if (struct.isSetServerError()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Virtualizer _iter254 : struct.success) + for (Virtualizer _iter278 : struct.success) { - _iter254.write(oprot); + _iter278.write(oprot); } } } + if (struct.isSetServerError()) { + struct.serverError.write(oprot); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list255 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list255.size); - for (int _i256 = 0; _i256 < _list255.size; ++_i256) + org.apache.thrift.protocol.TList _list279 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list279.size); + for (int _i280 = 0; _i280 < _list279.size; ++_i280) { - Virtualizer _elem257; - _elem257 = new Virtualizer(); - _elem257.read(iprot); - struct.success.add(_elem257); + Virtualizer _elem281; + _elem281 = new Virtualizer(); + _elem281.read(iprot); + struct.success.add(_elem281); } } struct.setSuccessIsSet(true); } + if (incoming.get(1)) { + struct.serverError = new TInternalServerError(); + struct.serverError.read(iprot); + struct.setServerErrorIsSet(true); + } + } + } + + } + + public static class getTags_args 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("getTags_args"); + + private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.I64, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTags_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTags_argsTupleSchemeFactory()); + } + + public long startDate; // 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 { + START_DATE((short)1, "startDate"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // START_DATE + return START_DATE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new 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) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __STARTDATE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final 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); + tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTags_args.class, metaDataMap); + } + + public getTags_args() { + } + + public getTags_args( + long startDate) + { + this(); + this.startDate = startDate; + setStartDateIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public getTags_args(getTags_args other) { + __isset_bitfield = other.__isset_bitfield; + this.startDate = other.startDate; + } + + public getTags_args deepCopy() { + return new getTags_args(this); + } + + @Override + public void clear() { + setStartDateIsSet(false); + this.startDate = 0; + } + + public long getStartDate() { + return this.startDate; + } + + public getTags_args setStartDate(long startDate) { + this.startDate = startDate; + setStartDateIsSet(true); + return this; + } + + public void unsetStartDate() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTDATE_ISSET_ID); + } + + /** Returns true if field startDate is set (has been assigned a value) and false otherwise */ + public boolean isSetStartDate() { + return EncodingUtils.testBit(__isset_bitfield, __STARTDATE_ISSET_ID); + } + + public void setStartDateIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTDATE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case START_DATE: + if (value == null) { + unsetStartDate(); + } else { + setStartDate((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case START_DATE: + return Long.valueOf(getStartDate()); + + } + throw new 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(); + } + + switch (field) { + case START_DATE: + return isSetStartDate(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTags_args) + return this.equals((getTags_args)that); + return false; + } + + public boolean equals(getTags_args that) { + if (that == null) + return false; + + boolean this_present_startDate = true; + boolean that_present_startDate = true; + if (this_present_startDate || that_present_startDate) { + if (!(this_present_startDate && that_present_startDate)) + return false; + if (this.startDate != that.startDate) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getTags_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(other.isSetStartDate()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartDate()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, other.startDate); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + 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); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTags_args("); + boolean first = true; + + sb.append("startDate:"); + sb.append(this.startDate); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTags_argsStandardSchemeFactory implements SchemeFactory { + public getTags_argsStandardScheme getScheme() { + return new getTags_argsStandardScheme(); + } + } + + private static class getTags_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTags_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // START_DATE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.startDate = iprot.readI64(); + struct.setStartDateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTags_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(START_DATE_FIELD_DESC); + oprot.writeI64(struct.startDate); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTags_argsTupleSchemeFactory implements SchemeFactory { + public getTags_argsTupleScheme getScheme() { + return new getTags_argsTupleScheme(); + } + } + + private static class getTags_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTags_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetStartDate()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetStartDate()) { + oprot.writeI64(struct.startDate); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTags_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.startDate = iprot.readI64(); + struct.setStartDateIsSet(true); + } + } + } + + } + + public static class getTags_result 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("getTags_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTags_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTags_resultTupleSchemeFactory()); + } + + public List success; // required + public TInternalServerError serverError; // 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 { + SUCCESS((short)0, "success"), + SERVER_ERROR((short)1, "serverError"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // SERVER_ERROR + return SERVER_ERROR; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new 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) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MasterTag.class)))); + tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTags_result.class, metaDataMap); + } + + public getTags_result() { + } + + public getTags_result( + List success, + TInternalServerError serverError) + { + this(); + this.success = success; + this.serverError = serverError; + } + + /** + * Performs a deep copy on other. + */ + public getTags_result(getTags_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (MasterTag other_element : other.success) { + __this__success.add(new MasterTag(other_element)); + } + this.success = __this__success; + } + if (other.isSetServerError()) { + this.serverError = new TInternalServerError(other.serverError); + } + } + + public getTags_result deepCopy() { + return new getTags_result(this); + } + + @Override + public void clear() { + this.success = null; + this.serverError = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(MasterTag elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getTags_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TInternalServerError getServerError() { + return this.serverError; + } + + public getTags_result setServerError(TInternalServerError serverError) { + this.serverError = serverError; + return this; + } + + public void unsetServerError() { + this.serverError = null; + } + + /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ + public boolean isSetServerError() { + return this.serverError != null; + } + + public void setServerErrorIsSet(boolean value) { + if (!value) { + this.serverError = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case SERVER_ERROR: + if (value == null) { + unsetServerError(); + } else { + setServerError((TInternalServerError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case SERVER_ERROR: + return getServerError(); + + } + throw new 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(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case SERVER_ERROR: + return isSetServerError(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTags_result) + return this.equals((getTags_result)that); + return false; + } + + public boolean equals(getTags_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_serverError = true && this.isSetServerError(); + boolean that_present_serverError = true && that.isSetServerError(); + if (this_present_serverError || that_present_serverError) { + if (!(this_present_serverError && that_present_serverError)) + return false; + if (!this.serverError.equals(that.serverError)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getTags_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetServerError()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + 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); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTags_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("serverError:"); + if (this.serverError == null) { + sb.append("null"); + } else { + sb.append(this.serverError); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTags_resultStandardSchemeFactory implements SchemeFactory { + public getTags_resultStandardScheme getScheme() { + return new getTags_resultStandardScheme(); + } + } + + private static class getTags_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTags_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list282 = iprot.readListBegin(); + struct.success = new ArrayList(_list282.size); + for (int _i283 = 0; _i283 < _list282.size; ++_i283) + { + MasterTag _elem284; + _elem284 = new MasterTag(); + _elem284.read(iprot); + struct.success.add(_elem284); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // SERVER_ERROR + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.serverError = new TInternalServerError(); + struct.serverError.read(iprot); + struct.setServerErrorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTags_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (MasterTag _iter285 : struct.success) + { + _iter285.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.serverError != null) { + oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); + struct.serverError.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTags_resultTupleSchemeFactory implements SchemeFactory { + public getTags_resultTupleScheme getScheme() { + return new getTags_resultTupleScheme(); + } + } + + private static class getTags_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTags_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetServerError()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (MasterTag _iter286 : struct.success) + { + _iter286.write(oprot); + } + } + } + if (struct.isSetServerError()) { + struct.serverError.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTags_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list287 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list287.size); + for (int _i288 = 0; _i288 < _list287.size; ++_i288) + { + MasterTag _elem289; + _elem289 = new MasterTag(); + _elem289.read(iprot); + struct.success.add(_elem289); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.serverError = new TInternalServerError(); + struct.serverError.read(iprot); + struct.setServerErrorIsSet(true); + } + } + } + + } + + public static class getSoftware_args 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("getSoftware_args"); + + private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.I64, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getSoftware_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getSoftware_argsTupleSchemeFactory()); + } + + public long startDate; // 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 { + START_DATE((short)1, "startDate"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // START_DATE + return START_DATE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new 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) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __STARTDATE_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final 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); + tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSoftware_args.class, metaDataMap); + } + + public getSoftware_args() { + } + + public getSoftware_args( + long startDate) + { + this(); + this.startDate = startDate; + setStartDateIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public getSoftware_args(getSoftware_args other) { + __isset_bitfield = other.__isset_bitfield; + this.startDate = other.startDate; + } + + public getSoftware_args deepCopy() { + return new getSoftware_args(this); + } + + @Override + public void clear() { + setStartDateIsSet(false); + this.startDate = 0; + } + + public long getStartDate() { + return this.startDate; + } + + public getSoftware_args setStartDate(long startDate) { + this.startDate = startDate; + setStartDateIsSet(true); + return this; + } + + public void unsetStartDate() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTDATE_ISSET_ID); + } + + /** Returns true if field startDate is set (has been assigned a value) and false otherwise */ + public boolean isSetStartDate() { + return EncodingUtils.testBit(__isset_bitfield, __STARTDATE_ISSET_ID); + } + + public void setStartDateIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTDATE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case START_DATE: + if (value == null) { + unsetStartDate(); + } else { + setStartDate((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case START_DATE: + return Long.valueOf(getStartDate()); + + } + throw new 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(); + } + + switch (field) { + case START_DATE: + return isSetStartDate(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getSoftware_args) + return this.equals((getSoftware_args)that); + return false; + } + + public boolean equals(getSoftware_args that) { + if (that == null) + return false; + + boolean this_present_startDate = true; + boolean that_present_startDate = true; + if (this_present_startDate || that_present_startDate) { + if (!(this_present_startDate && that_present_startDate)) + return false; + if (this.startDate != that.startDate) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getSoftware_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(other.isSetStartDate()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartDate()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, other.startDate); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + 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); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getSoftware_args("); + boolean first = true; + + sb.append("startDate:"); + sb.append(this.startDate); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getSoftware_argsStandardSchemeFactory implements SchemeFactory { + public getSoftware_argsStandardScheme getScheme() { + return new getSoftware_argsStandardScheme(); + } + } + + private static class getSoftware_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getSoftware_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // START_DATE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.startDate = iprot.readI64(); + struct.setStartDateIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getSoftware_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(START_DATE_FIELD_DESC); + oprot.writeI64(struct.startDate); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getSoftware_argsTupleSchemeFactory implements SchemeFactory { + public getSoftware_argsTupleScheme getScheme() { + return new getSoftware_argsTupleScheme(); + } + } + + private static class getSoftware_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getSoftware_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetStartDate()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetStartDate()) { + oprot.writeI64(struct.startDate); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getSoftware_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.startDate = iprot.readI64(); + struct.setStartDateIsSet(true); + } + } + } + + } + + public static class getSoftware_result 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("getSoftware_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getSoftware_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getSoftware_resultTupleSchemeFactory()); + } + + public List success; // required + public TInternalServerError serverError; // 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 { + SUCCESS((short)0, "success"), + SERVER_ERROR((short)1, "serverError"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // SERVER_ERROR + return SERVER_ERROR; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new 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) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final 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); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MasterSoftware.class)))); + tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSoftware_result.class, metaDataMap); + } + + public getSoftware_result() { + } + + public getSoftware_result( + List success, + TInternalServerError serverError) + { + this(); + this.success = success; + this.serverError = serverError; + } + + /** + * Performs a deep copy on other. + */ + public getSoftware_result(getSoftware_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(other.success.size()); + for (MasterSoftware other_element : other.success) { + __this__success.add(new MasterSoftware(other_element)); + } + this.success = __this__success; + } + if (other.isSetServerError()) { + this.serverError = new TInternalServerError(other.serverError); + } + } + + public getSoftware_result deepCopy() { + return new getSoftware_result(this); + } + + @Override + public void clear() { + this.success = null; + this.serverError = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(MasterSoftware elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getSoftware_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public TInternalServerError getServerError() { + return this.serverError; + } + + public getSoftware_result setServerError(TInternalServerError serverError) { + this.serverError = serverError; + return this; + } + + public void unsetServerError() { + this.serverError = null; + } + + /** Returns true if field serverError is set (has been assigned a value) and false otherwise */ + public boolean isSetServerError() { + return this.serverError != null; + } + + public void setServerErrorIsSet(boolean value) { + if (!value) { + this.serverError = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case SERVER_ERROR: + if (value == null) { + unsetServerError(); + } else { + setServerError((TInternalServerError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case SERVER_ERROR: + return getServerError(); + + } + throw new 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(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case SERVER_ERROR: + return isSetServerError(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getSoftware_result) + return this.equals((getSoftware_result)that); + return false; + } + + public boolean equals(getSoftware_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_serverError = true && this.isSetServerError(); + boolean that_present_serverError = true && that.isSetServerError(); + if (this_present_serverError || that_present_serverError) { + if (!(this_present_serverError && that_present_serverError)) + return false; + if (!this.serverError.equals(that.serverError)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(getSoftware_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetServerError()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverError, other.serverError); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + 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); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getSoftware_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("serverError:"); + if (this.serverError == null) { + sb.append("null"); + } else { + sb.append(this.serverError); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getSoftware_resultStandardSchemeFactory implements SchemeFactory { + public getSoftware_resultStandardScheme getScheme() { + return new getSoftware_resultStandardScheme(); + } + } + + private static class getSoftware_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getSoftware_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list290 = iprot.readListBegin(); + struct.success = new ArrayList(_list290.size); + for (int _i291 = 0; _i291 < _list290.size; ++_i291) + { + MasterSoftware _elem292; + _elem292 = new MasterSoftware(); + _elem292.read(iprot); + struct.success.add(_elem292); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // SERVER_ERROR + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.serverError = new TInternalServerError(); + struct.serverError.read(iprot); + struct.setServerErrorIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getSoftware_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (MasterSoftware _iter293 : struct.success) + { + _iter293.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.serverError != null) { + oprot.writeFieldBegin(SERVER_ERROR_FIELD_DESC); + struct.serverError.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getSoftware_resultTupleSchemeFactory implements SchemeFactory { + public getSoftware_resultTupleScheme getScheme() { + return new getSoftware_resultTupleScheme(); + } + } + + private static class getSoftware_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getSoftware_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetServerError()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (MasterSoftware _iter294 : struct.success) + { + _iter294.write(oprot); + } + } + } + if (struct.isSetServerError()) { + struct.serverError.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getSoftware_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list295 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list295.size); + for (int _i296 = 0; _i296 < _list295.size; ++_i296) + { + MasterSoftware _elem297; + _elem297 = new MasterSoftware(); + _elem297.read(iprot); + struct.success.add(_elem297); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.serverError = new TInternalServerError(); + struct.serverError.read(iprot); + struct.setServerErrorIsSet(true); + } } } diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/MasterSoftware.java b/src/main/java/org/openslx/bwlp/thrift/iface/MasterSoftware.java new file mode 100644 index 0000000..f18183d --- /dev/null +++ b/src/main/java/org/openslx/bwlp/thrift/iface/MasterSoftware.java @@ -0,0 +1,580 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * 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 org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class MasterSoftware 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("MasterSoftware"); + + private static final org.apache.thrift.protocol.TField SOFTWARE_FIELD_DESC = new org.apache.thrift.protocol.TField("software", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField IS_RESTRICTED_FIELD_DESC = new org.apache.thrift.protocol.TField("isRestricted", org.apache.thrift.protocol.TType.BOOL, (short)2); + private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I64, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new MasterSoftwareStandardSchemeFactory()); + schemes.put(TupleScheme.class, new MasterSoftwareTupleSchemeFactory()); + } + + public String software; // required + public boolean isRestricted; // required + public long createTime; // 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 { + SOFTWARE((short)1, "software"), + IS_RESTRICTED((short)2, "isRestricted"), + CREATE_TIME((short)3, "createTime"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // SOFTWARE + return SOFTWARE; + case 2: // IS_RESTRICTED + return IS_RESTRICTED; + case 3: // CREATE_TIME + return CREATE_TIME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new 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) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ISRESTRICTED_ISSET_ID = 0; + private static final int __CREATETIME_ISSET_ID = 1; + private byte __isset_bitfield = 0; + public static final 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); + tmpMap.put(_Fields.SOFTWARE, new org.apache.thrift.meta_data.FieldMetaData("software", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IS_RESTRICTED, new org.apache.thrift.meta_data.FieldMetaData("isRestricted", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MasterSoftware.class, metaDataMap); + } + + public MasterSoftware() { + } + + public MasterSoftware( + String software, + boolean isRestricted, + long createTime) + { + this(); + this.software = software; + this.isRestricted = isRestricted; + setIsRestrictedIsSet(true); + this.createTime = createTime; + setCreateTimeIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public MasterSoftware(MasterSoftware other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetSoftware()) { + this.software = other.software; + } + this.isRestricted = other.isRestricted; + this.createTime = other.createTime; + } + + public MasterSoftware deepCopy() { + return new MasterSoftware(this); + } + + @Override + public void clear() { + this.software = null; + setIsRestrictedIsSet(false); + this.isRestricted = false; + setCreateTimeIsSet(false); + this.createTime = 0; + } + + public String getSoftware() { + return this.software; + } + + public MasterSoftware setSoftware(String software) { + this.software = software; + return this; + } + + public void unsetSoftware() { + this.software = null; + } + + /** Returns true if field software is set (has been assigned a value) and false otherwise */ + public boolean isSetSoftware() { + return this.software != null; + } + + public void setSoftwareIsSet(boolean value) { + if (!value) { + this.software = null; + } + } + + public boolean isIsRestricted() { + return this.isRestricted; + } + + public MasterSoftware setIsRestricted(boolean isRestricted) { + this.isRestricted = isRestricted; + setIsRestrictedIsSet(true); + return this; + } + + public void unsetIsRestricted() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID); + } + + /** Returns true if field isRestricted is set (has been assigned a value) and false otherwise */ + public boolean isSetIsRestricted() { + return EncodingUtils.testBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID); + } + + public void setIsRestrictedIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID, value); + } + + public long getCreateTime() { + return this.createTime; + } + + public MasterSoftware setCreateTime(long createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + return this; + } + + public void unsetCreateTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ + public boolean isSetCreateTime() { + return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SOFTWARE: + if (value == null) { + unsetSoftware(); + } else { + setSoftware((String)value); + } + break; + + case IS_RESTRICTED: + if (value == null) { + unsetIsRestricted(); + } else { + setIsRestricted((Boolean)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SOFTWARE: + return getSoftware(); + + case IS_RESTRICTED: + return Boolean.valueOf(isIsRestricted()); + + case CREATE_TIME: + return Long.valueOf(getCreateTime()); + + } + throw new 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(); + } + + switch (field) { + case SOFTWARE: + return isSetSoftware(); + case IS_RESTRICTED: + return isSetIsRestricted(); + case CREATE_TIME: + return isSetCreateTime(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof MasterSoftware) + return this.equals((MasterSoftware)that); + return false; + } + + public boolean equals(MasterSoftware that) { + if (that == null) + return false; + + boolean this_present_software = true && this.isSetSoftware(); + boolean that_present_software = true && that.isSetSoftware(); + if (this_present_software || that_present_software) { + if (!(this_present_software && that_present_software)) + return false; + if (!this.software.equals(that.software)) + return false; + } + + boolean this_present_isRestricted = true; + boolean that_present_isRestricted = true; + if (this_present_isRestricted || that_present_isRestricted) { + if (!(this_present_isRestricted && that_present_isRestricted)) + return false; + if (this.isRestricted != that.isRestricted) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(MasterSoftware other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSoftware()).compareTo(other.isSetSoftware()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSoftware()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.software, other.software); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIsRestricted()).compareTo(other.isSetIsRestricted()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsRestricted()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isRestricted, other.isRestricted); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + 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); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("MasterSoftware("); + boolean first = true; + + sb.append("software:"); + if (this.software == null) { + sb.append("null"); + } else { + sb.append(this.software); + } + first = false; + if (!first) sb.append(", "); + sb.append("isRestricted:"); + sb.append(this.isRestricted); + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class MasterSoftwareStandardSchemeFactory implements SchemeFactory { + public MasterSoftwareStandardScheme getScheme() { + return new MasterSoftwareStandardScheme(); + } + } + + private static class MasterSoftwareStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, MasterSoftware struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // SOFTWARE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.software = iprot.readString(); + struct.setSoftwareIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IS_RESTRICTED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isRestricted = iprot.readBool(); + struct.setIsRestrictedIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // CREATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.createTime = iprot.readI64(); + struct.setCreateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, MasterSoftware struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.software != null) { + oprot.writeFieldBegin(SOFTWARE_FIELD_DESC); + oprot.writeString(struct.software); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_RESTRICTED_FIELD_DESC); + oprot.writeBool(struct.isRestricted); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI64(struct.createTime); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class MasterSoftwareTupleSchemeFactory implements SchemeFactory { + public MasterSoftwareTupleScheme getScheme() { + return new MasterSoftwareTupleScheme(); + } + } + + private static class MasterSoftwareTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, MasterSoftware struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSoftware()) { + optionals.set(0); + } + if (struct.isSetIsRestricted()) { + optionals.set(1); + } + if (struct.isSetCreateTime()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSoftware()) { + oprot.writeString(struct.software); + } + if (struct.isSetIsRestricted()) { + oprot.writeBool(struct.isRestricted); + } + if (struct.isSetCreateTime()) { + oprot.writeI64(struct.createTime); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, MasterSoftware struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.software = iprot.readString(); + struct.setSoftwareIsSet(true); + } + if (incoming.get(1)) { + struct.isRestricted = iprot.readBool(); + struct.setIsRestrictedIsSet(true); + } + if (incoming.get(2)) { + struct.createTime = iprot.readI64(); + struct.setCreateTimeIsSet(true); + } + } + } + +} + diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/MasterTag.java b/src/main/java/org/openslx/bwlp/thrift/iface/MasterTag.java new file mode 100644 index 0000000..8ec9a1a --- /dev/null +++ b/src/main/java/org/openslx/bwlp/thrift/iface/MasterTag.java @@ -0,0 +1,486 @@ +/** + * Autogenerated by Thrift Compiler (0.9.1) + * + * 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 org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class MasterTag 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("MasterTag"); + + private static final org.apache.thrift.protocol.TField TAG_FIELD_DESC = new org.apache.thrift.protocol.TField("tag", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I64, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new MasterTagStandardSchemeFactory()); + schemes.put(TupleScheme.class, new MasterTagTupleSchemeFactory()); + } + + public String tag; // required + public long createTime; // 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 { + TAG((short)1, "tag"), + CREATE_TIME((short)2, "createTime"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TAG + return TAG; + case 2: // CREATE_TIME + return CREATE_TIME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new 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) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __CREATETIME_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final 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); + tmpMap.put(_Fields.TAG, new org.apache.thrift.meta_data.FieldMetaData("tag", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MasterTag.class, metaDataMap); + } + + public MasterTag() { + } + + public MasterTag( + String tag, + long createTime) + { + this(); + this.tag = tag; + this.createTime = createTime; + setCreateTimeIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public MasterTag(MasterTag other) { + __isset_bitfield = other.__isset_bitfield; + if (other.isSetTag()) { + this.tag = other.tag; + } + this.createTime = other.createTime; + } + + public MasterTag deepCopy() { + return new MasterTag(this); + } + + @Override + public void clear() { + this.tag = null; + setCreateTimeIsSet(false); + this.createTime = 0; + } + + public String getTag() { + return this.tag; + } + + public MasterTag setTag(String tag) { + this.tag = tag; + return this; + } + + public void unsetTag() { + this.tag = null; + } + + /** Returns true if field tag is set (has been assigned a value) and false otherwise */ + public boolean isSetTag() { + return this.tag != null; + } + + public void setTagIsSet(boolean value) { + if (!value) { + this.tag = null; + } + } + + public long getCreateTime() { + return this.createTime; + } + + public MasterTag setCreateTime(long createTime) { + this.createTime = createTime; + setCreateTimeIsSet(true); + return this; + } + + public void unsetCreateTime() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + /** Returns true if field createTime is set (has been assigned a value) and false otherwise */ + public boolean isSetCreateTime() { + return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TAG: + if (value == null) { + unsetTag(); + } else { + setTag((String)value); + } + break; + + case CREATE_TIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TAG: + return getTag(); + + case CREATE_TIME: + return Long.valueOf(getCreateTime()); + + } + throw new 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(); + } + + switch (field) { + case TAG: + return isSetTag(); + case CREATE_TIME: + return isSetCreateTime(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof MasterTag) + return this.equals((MasterTag)that); + return false; + } + + public boolean equals(MasterTag that) { + if (that == null) + return false; + + boolean this_present_tag = true && this.isSetTag(); + boolean that_present_tag = true && that.isSetTag(); + if (this_present_tag || that_present_tag) { + if (!(this_present_tag && that_present_tag)) + return false; + if (!this.tag.equals(that.tag)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + @Override + public int compareTo(MasterTag other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTag()).compareTo(other.isSetTag()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTag()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tag, other.tag); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + 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); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("MasterTag("); + boolean first = true; + + sb.append("tag:"); + if (this.tag == null) { + sb.append("null"); + } else { + sb.append(this.tag); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class MasterTagStandardSchemeFactory implements SchemeFactory { + public MasterTagStandardScheme getScheme() { + return new MasterTagStandardScheme(); + } + } + + private static class MasterTagStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, MasterTag struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TAG + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tag = iprot.readString(); + struct.setTagIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // CREATE_TIME + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.createTime = iprot.readI64(); + struct.setCreateTimeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, MasterTag struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tag != null) { + oprot.writeFieldBegin(TAG_FIELD_DESC); + oprot.writeString(struct.tag); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI64(struct.createTime); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class MasterTagTupleSchemeFactory implements SchemeFactory { + public MasterTagTupleScheme getScheme() { + return new MasterTagTupleScheme(); + } + } + + private static class MasterTagTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, MasterTag struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTag()) { + optionals.set(0); + } + if (struct.isSetCreateTime()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetTag()) { + oprot.writeString(struct.tag); + } + if (struct.isSetCreateTime()) { + oprot.writeI64(struct.createTime); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, MasterTag struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.tag = iprot.readString(); + struct.setTagIsSet(true); + } + if (incoming.get(1)) { + struct.createTime = iprot.readI64(); + struct.setCreateTimeIsSet(true); + } + } + } + +} + diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java index a8099cf..9c47239 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java @@ -6553,13 +6553,13 @@ public class SatelliteServer { case 4: // BLOCK_HASHES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list106 = iprot.readListBegin(); - struct.blockHashes = new ArrayList(_list106.size); - for (int _i107 = 0; _i107 < _list106.size; ++_i107) + org.apache.thrift.protocol.TList _list130 = iprot.readListBegin(); + struct.blockHashes = new ArrayList(_list130.size); + for (int _i131 = 0; _i131 < _list130.size; ++_i131) { - ByteBuffer _elem108; - _elem108 = iprot.readBinary(); - struct.blockHashes.add(_elem108); + ByteBuffer _elem132; + _elem132 = iprot.readBinary(); + struct.blockHashes.add(_elem132); } iprot.readListEnd(); } @@ -6600,9 +6600,9 @@ public class SatelliteServer { oprot.writeFieldBegin(BLOCK_HASHES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.blockHashes.size())); - for (ByteBuffer _iter109 : struct.blockHashes) + for (ByteBuffer _iter133 : struct.blockHashes) { - oprot.writeBinary(_iter109); + oprot.writeBinary(_iter133); } oprot.writeListEnd(); } @@ -6651,9 +6651,9 @@ public class SatelliteServer { if (struct.isSetBlockHashes()) { { oprot.writeI32(struct.blockHashes.size()); - for (ByteBuffer _iter110 : struct.blockHashes) + for (ByteBuffer _iter134 : struct.blockHashes) { - oprot.writeBinary(_iter110); + oprot.writeBinary(_iter134); } } } @@ -6677,13 +6677,13 @@ public class SatelliteServer { } if (incoming.get(3)) { { - org.apache.thrift.protocol.TList _list111 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.blockHashes = new ArrayList(_list111.size); - for (int _i112 = 0; _i112 < _list111.size; ++_i112) + org.apache.thrift.protocol.TList _list135 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.blockHashes = new ArrayList(_list135.size); + for (int _i136 = 0; _i136 < _list135.size; ++_i136) { - ByteBuffer _elem113; - _elem113 = iprot.readBinary(); - struct.blockHashes.add(_elem113); + ByteBuffer _elem137; + _elem137 = iprot.readBinary(); + struct.blockHashes.add(_elem137); } } struct.setBlockHashesIsSet(true); @@ -12717,14 +12717,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list114 = iprot.readListBegin(); - struct.success = new ArrayList(_list114.size); - for (int _i115 = 0; _i115 < _list114.size; ++_i115) + org.apache.thrift.protocol.TList _list138 = iprot.readListBegin(); + struct.success = new ArrayList(_list138.size); + for (int _i139 = 0; _i139 < _list138.size; ++_i139) { - UserInfo _elem116; - _elem116 = new UserInfo(); - _elem116.read(iprot); - struct.success.add(_elem116); + UserInfo _elem140; + _elem140 = new UserInfo(); + _elem140.read(iprot); + struct.success.add(_elem140); } iprot.readListEnd(); } @@ -12770,9 +12770,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (UserInfo _iter117 : struct.success) + for (UserInfo _iter141 : struct.success) { - _iter117.write(oprot); + _iter141.write(oprot); } oprot.writeListEnd(); } @@ -12819,9 +12819,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (UserInfo _iter118 : struct.success) + for (UserInfo _iter142 : struct.success) { - _iter118.write(oprot); + _iter142.write(oprot); } } } @@ -12839,14 +12839,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list119 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list119.size); - for (int _i120 = 0; _i120 < _list119.size; ++_i120) + org.apache.thrift.protocol.TList _list143 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list143.size); + for (int _i144 = 0; _i144 < _list143.size; ++_i144) { - UserInfo _elem121; - _elem121 = new UserInfo(); - _elem121.read(iprot); - struct.success.add(_elem121); + UserInfo _elem145; + _elem145 = new UserInfo(); + _elem145.read(iprot); + struct.success.add(_elem145); } } struct.setSuccessIsSet(true); @@ -13421,14 +13421,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list122 = iprot.readListBegin(); - struct.success = new ArrayList(_list122.size); - for (int _i123 = 0; _i123 < _list122.size; ++_i123) + org.apache.thrift.protocol.TList _list146 = iprot.readListBegin(); + struct.success = new ArrayList(_list146.size); + for (int _i147 = 0; _i147 < _list146.size; ++_i147) { - OperatingSystem _elem124; - _elem124 = new OperatingSystem(); - _elem124.read(iprot); - struct.success.add(_elem124); + OperatingSystem _elem148; + _elem148 = new OperatingSystem(); + _elem148.read(iprot); + struct.success.add(_elem148); } iprot.readListEnd(); } @@ -13456,9 +13456,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (OperatingSystem _iter125 : struct.success) + for (OperatingSystem _iter149 : struct.success) { - _iter125.write(oprot); + _iter149.write(oprot); } oprot.writeListEnd(); } @@ -13489,9 +13489,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (OperatingSystem _iter126 : struct.success) + for (OperatingSystem _iter150 : struct.success) { - _iter126.write(oprot); + _iter150.write(oprot); } } } @@ -13503,14 +13503,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list127 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list127.size); - for (int _i128 = 0; _i128 < _list127.size; ++_i128) + org.apache.thrift.protocol.TList _list151 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list151.size); + for (int _i152 = 0; _i152 < _list151.size; ++_i152) { - OperatingSystem _elem129; - _elem129 = new OperatingSystem(); - _elem129.read(iprot); - struct.success.add(_elem129); + OperatingSystem _elem153; + _elem153 = new OperatingSystem(); + _elem153.read(iprot); + struct.success.add(_elem153); } } struct.setSuccessIsSet(true); @@ -14075,14 +14075,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list130 = iprot.readListBegin(); - struct.success = new ArrayList(_list130.size); - for (int _i131 = 0; _i131 < _list130.size; ++_i131) + org.apache.thrift.protocol.TList _list154 = iprot.readListBegin(); + struct.success = new ArrayList(_list154.size); + for (int _i155 = 0; _i155 < _list154.size; ++_i155) { - Virtualizer _elem132; - _elem132 = new Virtualizer(); - _elem132.read(iprot); - struct.success.add(_elem132); + Virtualizer _elem156; + _elem156 = new Virtualizer(); + _elem156.read(iprot); + struct.success.add(_elem156); } iprot.readListEnd(); } @@ -14110,9 +14110,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Virtualizer _iter133 : struct.success) + for (Virtualizer _iter157 : struct.success) { - _iter133.write(oprot); + _iter157.write(oprot); } oprot.writeListEnd(); } @@ -14143,9 +14143,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Virtualizer _iter134 : struct.success) + for (Virtualizer _iter158 : struct.success) { - _iter134.write(oprot); + _iter158.write(oprot); } } } @@ -14157,14 +14157,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list135 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list135.size); - for (int _i136 = 0; _i136 < _list135.size; ++_i136) + org.apache.thrift.protocol.TList _list159 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list159.size); + for (int _i160 = 0; _i160 < _list159.size; ++_i160) { - Virtualizer _elem137; - _elem137 = new Virtualizer(); - _elem137.read(iprot); - struct.success.add(_elem137); + Virtualizer _elem161; + _elem161 = new Virtualizer(); + _elem161.read(iprot); + struct.success.add(_elem161); } } struct.setSuccessIsSet(true); @@ -14729,14 +14729,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list138 = iprot.readListBegin(); - struct.success = new ArrayList(_list138.size); - for (int _i139 = 0; _i139 < _list138.size; ++_i139) + org.apache.thrift.protocol.TList _list162 = iprot.readListBegin(); + struct.success = new ArrayList(_list162.size); + for (int _i163 = 0; _i163 < _list162.size; ++_i163) { - Organization _elem140; - _elem140 = new Organization(); - _elem140.read(iprot); - struct.success.add(_elem140); + Organization _elem164; + _elem164 = new Organization(); + _elem164.read(iprot); + struct.success.add(_elem164); } iprot.readListEnd(); } @@ -14764,9 +14764,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Organization _iter141 : struct.success) + for (Organization _iter165 : struct.success) { - _iter141.write(oprot); + _iter165.write(oprot); } oprot.writeListEnd(); } @@ -14797,9 +14797,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Organization _iter142 : struct.success) + for (Organization _iter166 : struct.success) { - _iter142.write(oprot); + _iter166.write(oprot); } } } @@ -14811,14 +14811,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list143 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list143.size); - for (int _i144 = 0; _i144 < _list143.size; ++_i144) + org.apache.thrift.protocol.TList _list167 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list167.size); + for (int _i168 = 0; _i168 < _list167.size; ++_i168) { - Organization _elem145; - _elem145 = new Organization(); - _elem145.read(iprot); - struct.success.add(_elem145); + Organization _elem169; + _elem169 = new Organization(); + _elem169.read(iprot); + struct.success.add(_elem169); } } struct.setSuccessIsSet(true); @@ -15296,13 +15296,13 @@ public class SatelliteServer { case 2: // TAG_SEARCH if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list146 = iprot.readListBegin(); - struct.tagSearch = new ArrayList(_list146.size); - for (int _i147 = 0; _i147 < _list146.size; ++_i147) + org.apache.thrift.protocol.TList _list170 = iprot.readListBegin(); + struct.tagSearch = new ArrayList(_list170.size); + for (int _i171 = 0; _i171 < _list170.size; ++_i171) { - String _elem148; - _elem148 = iprot.readString(); - struct.tagSearch.add(_elem148); + String _elem172; + _elem172 = iprot.readString(); + struct.tagSearch.add(_elem172); } iprot.readListEnd(); } @@ -15343,9 +15343,9 @@ public class SatelliteServer { oprot.writeFieldBegin(TAG_SEARCH_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tagSearch.size())); - for (String _iter149 : struct.tagSearch) + for (String _iter173 : struct.tagSearch) { - oprot.writeString(_iter149); + oprot.writeString(_iter173); } oprot.writeListEnd(); } @@ -15388,9 +15388,9 @@ public class SatelliteServer { if (struct.isSetTagSearch()) { { oprot.writeI32(struct.tagSearch.size()); - for (String _iter150 : struct.tagSearch) + for (String _iter174 : struct.tagSearch) { - oprot.writeString(_iter150); + oprot.writeString(_iter174); } } } @@ -15409,13 +15409,13 @@ public class SatelliteServer { } if (incoming.get(1)) { { - org.apache.thrift.protocol.TList _list151 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.tagSearch = new ArrayList(_list151.size); - for (int _i152 = 0; _i152 < _list151.size; ++_i152) + org.apache.thrift.protocol.TList _list175 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.tagSearch = new ArrayList(_list175.size); + for (int _i176 = 0; _i176 < _list175.size; ++_i176) { - String _elem153; - _elem153 = iprot.readString(); - struct.tagSearch.add(_elem153); + String _elem177; + _elem177 = iprot.readString(); + struct.tagSearch.add(_elem177); } } struct.setTagSearchIsSet(true); @@ -15892,14 +15892,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list154 = iprot.readListBegin(); - struct.success = new ArrayList(_list154.size); - for (int _i155 = 0; _i155 < _list154.size; ++_i155) + org.apache.thrift.protocol.TList _list178 = iprot.readListBegin(); + struct.success = new ArrayList(_list178.size); + for (int _i179 = 0; _i179 < _list178.size; ++_i179) { - ImageSummaryRead _elem156; - _elem156 = new ImageSummaryRead(); - _elem156.read(iprot); - struct.success.add(_elem156); + ImageSummaryRead _elem180; + _elem180 = new ImageSummaryRead(); + _elem180.read(iprot); + struct.success.add(_elem180); } iprot.readListEnd(); } @@ -15945,9 +15945,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (ImageSummaryRead _iter157 : struct.success) + for (ImageSummaryRead _iter181 : struct.success) { - _iter157.write(oprot); + _iter181.write(oprot); } oprot.writeListEnd(); } @@ -15994,9 +15994,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (ImageSummaryRead _iter158 : struct.success) + for (ImageSummaryRead _iter182 : struct.success) { - _iter158.write(oprot); + _iter182.write(oprot); } } } @@ -16014,14 +16014,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list159 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list159.size); - for (int _i160 = 0; _i160 < _list159.size; ++_i160) + org.apache.thrift.protocol.TList _list183 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list183.size); + for (int _i184 = 0; _i184 < _list183.size; ++_i184) { - ImageSummaryRead _elem161; - _elem161 = new ImageSummaryRead(); - _elem161.read(iprot); - struct.success.add(_elem161); + ImageSummaryRead _elem185; + _elem185 = new ImageSummaryRead(); + _elem185.read(iprot); + struct.success.add(_elem185); } } struct.setSuccessIsSet(true); @@ -22214,16 +22214,16 @@ public class SatelliteServer { case 3: // PERMISSIONS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map162 = iprot.readMapBegin(); - struct.permissions = new HashMap(2*_map162.size); - for (int _i163 = 0; _i163 < _map162.size; ++_i163) + org.apache.thrift.protocol.TMap _map186 = iprot.readMapBegin(); + struct.permissions = new HashMap(2*_map186.size); + for (int _i187 = 0; _i187 < _map186.size; ++_i187) { - String _key164; - ImagePermissions _val165; - _key164 = iprot.readString(); - _val165 = new ImagePermissions(); - _val165.read(iprot); - struct.permissions.put(_key164, _val165); + String _key188; + ImagePermissions _val189; + _key188 = iprot.readString(); + _val189 = new ImagePermissions(); + _val189.read(iprot); + struct.permissions.put(_key188, _val189); } iprot.readMapEnd(); } @@ -22261,10 +22261,10 @@ public class SatelliteServer { oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.permissions.size())); - for (Map.Entry _iter166 : struct.permissions.entrySet()) + for (Map.Entry _iter190 : struct.permissions.entrySet()) { - oprot.writeString(_iter166.getKey()); - _iter166.getValue().write(oprot); + oprot.writeString(_iter190.getKey()); + _iter190.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -22307,10 +22307,10 @@ public class SatelliteServer { if (struct.isSetPermissions()) { { oprot.writeI32(struct.permissions.size()); - for (Map.Entry _iter167 : struct.permissions.entrySet()) + for (Map.Entry _iter191 : struct.permissions.entrySet()) { - oprot.writeString(_iter167.getKey()); - _iter167.getValue().write(oprot); + oprot.writeString(_iter191.getKey()); + _iter191.getValue().write(oprot); } } } @@ -22330,16 +22330,16 @@ public class SatelliteServer { } if (incoming.get(2)) { { - org.apache.thrift.protocol.TMap _map168 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.permissions = new HashMap(2*_map168.size); - for (int _i169 = 0; _i169 < _map168.size; ++_i169) + org.apache.thrift.protocol.TMap _map192 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.permissions = new HashMap(2*_map192.size); + for (int _i193 = 0; _i193 < _map192.size; ++_i193) { - String _key170; - ImagePermissions _val171; - _key170 = iprot.readString(); - _val171 = new ImagePermissions(); - _val171.read(iprot); - struct.permissions.put(_key170, _val171); + String _key194; + ImagePermissions _val195; + _key194 = iprot.readString(); + _val195 = new ImagePermissions(); + _val195.read(iprot); + struct.permissions.put(_key194, _val195); } } struct.setPermissionsIsSet(true); @@ -23908,16 +23908,16 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map172 = iprot.readMapBegin(); - struct.success = new HashMap(2*_map172.size); - for (int _i173 = 0; _i173 < _map172.size; ++_i173) + org.apache.thrift.protocol.TMap _map196 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map196.size); + for (int _i197 = 0; _i197 < _map196.size; ++_i197) { - String _key174; - ImagePermissions _val175; - _key174 = iprot.readString(); - _val175 = new ImagePermissions(); - _val175.read(iprot); - struct.success.put(_key174, _val175); + String _key198; + ImagePermissions _val199; + _key198 = iprot.readString(); + _val199 = new ImagePermissions(); + _val199.read(iprot); + struct.success.put(_key198, _val199); } iprot.readMapEnd(); } @@ -23972,10 +23972,10 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Map.Entry _iter176 : struct.success.entrySet()) + for (Map.Entry _iter200 : struct.success.entrySet()) { - oprot.writeString(_iter176.getKey()); - _iter176.getValue().write(oprot); + oprot.writeString(_iter200.getKey()); + _iter200.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -24030,10 +24030,10 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Map.Entry _iter177 : struct.success.entrySet()) + for (Map.Entry _iter201 : struct.success.entrySet()) { - oprot.writeString(_iter177.getKey()); - _iter177.getValue().write(oprot); + oprot.writeString(_iter201.getKey()); + _iter201.getValue().write(oprot); } } } @@ -24054,16 +24054,16 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map178 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new HashMap(2*_map178.size); - for (int _i179 = 0; _i179 < _map178.size; ++_i179) + org.apache.thrift.protocol.TMap _map202 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new HashMap(2*_map202.size); + for (int _i203 = 0; _i203 < _map202.size; ++_i203) { - String _key180; - ImagePermissions _val181; - _key180 = iprot.readString(); - _val181 = new ImagePermissions(); - _val181.read(iprot); - struct.success.put(_key180, _val181); + String _key204; + ImagePermissions _val205; + _key204 = iprot.readString(); + _val205 = new ImagePermissions(); + _val205.read(iprot); + struct.success.put(_key204, _val205); } } struct.setSuccessIsSet(true); @@ -28253,14 +28253,14 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list182 = iprot.readListBegin(); - struct.success = new ArrayList(_list182.size); - for (int _i183 = 0; _i183 < _list182.size; ++_i183) + org.apache.thrift.protocol.TList _list206 = iprot.readListBegin(); + struct.success = new ArrayList(_list206.size); + for (int _i207 = 0; _i207 < _list206.size; ++_i207) { - LectureSummary _elem184; - _elem184 = new LectureSummary(); - _elem184.read(iprot); - struct.success.add(_elem184); + LectureSummary _elem208; + _elem208 = new LectureSummary(); + _elem208.read(iprot); + struct.success.add(_elem208); } iprot.readListEnd(); } @@ -28306,9 +28306,9 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (LectureSummary _iter185 : struct.success) + for (LectureSummary _iter209 : struct.success) { - _iter185.write(oprot); + _iter209.write(oprot); } oprot.writeListEnd(); } @@ -28355,9 +28355,9 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (LectureSummary _iter186 : struct.success) + for (LectureSummary _iter210 : struct.success) { - _iter186.write(oprot); + _iter210.write(oprot); } } } @@ -28375,14 +28375,14 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list187 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list187.size); - for (int _i188 = 0; _i188 < _list187.size; ++_i188) + org.apache.thrift.protocol.TList _list211 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list211.size); + for (int _i212 = 0; _i212 < _list211.size; ++_i212) { - LectureSummary _elem189; - _elem189 = new LectureSummary(); - _elem189.read(iprot); - struct.success.add(_elem189); + LectureSummary _elem213; + _elem213 = new LectureSummary(); + _elem213.read(iprot); + struct.success.add(_elem213); } } struct.setSuccessIsSet(true); @@ -31019,16 +31019,16 @@ public class SatelliteServer { case 3: // PERMISSIONS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map190 = iprot.readMapBegin(); - struct.permissions = new HashMap(2*_map190.size); - for (int _i191 = 0; _i191 < _map190.size; ++_i191) + org.apache.thrift.protocol.TMap _map214 = iprot.readMapBegin(); + struct.permissions = new HashMap(2*_map214.size); + for (int _i215 = 0; _i215 < _map214.size; ++_i215) { - String _key192; - LecturePermissions _val193; - _key192 = iprot.readString(); - _val193 = new LecturePermissions(); - _val193.read(iprot); - struct.permissions.put(_key192, _val193); + String _key216; + LecturePermissions _val217; + _key216 = iprot.readString(); + _val217 = new LecturePermissions(); + _val217.read(iprot); + struct.permissions.put(_key216, _val217); } iprot.readMapEnd(); } @@ -31066,10 +31066,10 @@ public class SatelliteServer { oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.permissions.size())); - for (Map.Entry _iter194 : struct.permissions.entrySet()) + for (Map.Entry _iter218 : struct.permissions.entrySet()) { - oprot.writeString(_iter194.getKey()); - _iter194.getValue().write(oprot); + oprot.writeString(_iter218.getKey()); + _iter218.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -31112,10 +31112,10 @@ public class SatelliteServer { if (struct.isSetPermissions()) { { oprot.writeI32(struct.permissions.size()); - for (Map.Entry _iter195 : struct.permissions.entrySet()) + for (Map.Entry _iter219 : struct.permissions.entrySet()) { - oprot.writeString(_iter195.getKey()); - _iter195.getValue().write(oprot); + oprot.writeString(_iter219.getKey()); + _iter219.getValue().write(oprot); } } } @@ -31135,16 +31135,16 @@ public class SatelliteServer { } if (incoming.get(2)) { { - org.apache.thrift.protocol.TMap _map196 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.permissions = new HashMap(2*_map196.size); - for (int _i197 = 0; _i197 < _map196.size; ++_i197) + org.apache.thrift.protocol.TMap _map220 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.permissions = new HashMap(2*_map220.size); + for (int _i221 = 0; _i221 < _map220.size; ++_i221) { - String _key198; - LecturePermissions _val199; - _key198 = iprot.readString(); - _val199 = new LecturePermissions(); - _val199.read(iprot); - struct.permissions.put(_key198, _val199); + String _key222; + LecturePermissions _val223; + _key222 = iprot.readString(); + _val223 = new LecturePermissions(); + _val223.read(iprot); + struct.permissions.put(_key222, _val223); } } struct.setPermissionsIsSet(true); @@ -32713,16 +32713,16 @@ public class SatelliteServer { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map200 = iprot.readMapBegin(); - struct.success = new HashMap(2*_map200.size); - for (int _i201 = 0; _i201 < _map200.size; ++_i201) + org.apache.thrift.protocol.TMap _map224 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map224.size); + for (int _i225 = 0; _i225 < _map224.size; ++_i225) { - String _key202; - LecturePermissions _val203; - _key202 = iprot.readString(); - _val203 = new LecturePermissions(); - _val203.read(iprot); - struct.success.put(_key202, _val203); + String _key226; + LecturePermissions _val227; + _key226 = iprot.readString(); + _val227 = new LecturePermissions(); + _val227.read(iprot); + struct.success.put(_key226, _val227); } iprot.readMapEnd(); } @@ -32777,10 +32777,10 @@ public class SatelliteServer { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Map.Entry _iter204 : struct.success.entrySet()) + for (Map.Entry _iter228 : struct.success.entrySet()) { - oprot.writeString(_iter204.getKey()); - _iter204.getValue().write(oprot); + oprot.writeString(_iter228.getKey()); + _iter228.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -32835,10 +32835,10 @@ public class SatelliteServer { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Map.Entry _iter205 : struct.success.entrySet()) + for (Map.Entry _iter229 : struct.success.entrySet()) { - oprot.writeString(_iter205.getKey()); - _iter205.getValue().write(oprot); + oprot.writeString(_iter229.getKey()); + _iter229.getValue().write(oprot); } } } @@ -32859,16 +32859,16 @@ public class SatelliteServer { BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map206 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new HashMap(2*_map206.size); - for (int _i207 = 0; _i207 < _map206.size; ++_i207) + org.apache.thrift.protocol.TMap _map230 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new HashMap(2*_map230.size); + for (int _i231 = 0; _i231 < _map230.size; ++_i231) { - String _key208; - LecturePermissions _val209; - _key208 = iprot.readString(); - _val209 = new LecturePermissions(); - _val209.read(iprot); - struct.success.put(_key208, _val209); + String _key232; + LecturePermissions _val233; + _key232 = iprot.readString(); + _val233 = new LecturePermissions(); + _val233.read(iprot); + struct.success.put(_key232, _val233); } } struct.setSuccessIsSet(true); diff --git a/src/main/java/org/openslx/filetransfer/ClassTest.java b/src/main/java/org/openslx/filetransfer/ClassTest.java index 37b37c0..9d5bc82 100644 --- a/src/main/java/org/openslx/filetransfer/ClassTest.java +++ b/src/main/java/org/openslx/filetransfer/ClassTest.java @@ -65,7 +65,7 @@ public class ClassTest context.init( keyManagers, null, null ); - Listener listener = new Listener( new Test(), context, 6789 ); + Listener listener = new Listener( new Test(), context, 6789, 10000 ); listener.start(); Thread.sleep( 2000 ); @@ -78,7 +78,7 @@ public class ClassTest context.init( null, trustManagers, null ); - Downloader d = new Downloader( "localhost", 6789, context, "xyz" ); + Downloader d = new Downloader( "localhost", 6789, 10000, context, "xyz" ); boolean res = d.download( outFile, new WantRangeCallback() { long pos = 0; long size = -1; diff --git a/src/main/java/org/openslx/filetransfer/Downloader.java b/src/main/java/org/openslx/filetransfer/Downloader.java index 20a50e6..acd70a7 100644 --- a/src/main/java/org/openslx/filetransfer/Downloader.java +++ b/src/main/java/org/openslx/filetransfer/Downloader.java @@ -23,9 +23,9 @@ public class Downloader extends Transfer * @param port Port to connect to * @throws IOException */ - public Downloader( String host, int port, SSLContext context, String token ) throws IOException + public Downloader( String host, int port, int readTimeoutMs, SSLContext context, String token ) throws IOException { - super( host, port, context, log ); + super( host, port, readTimeoutMs, context, log ); outStream.writeByte( 'D' ); if ( !sendToken( token ) || !sendEndOfMeta() ) throw new IOException( "Sending token failed" ); diff --git a/src/main/java/org/openslx/filetransfer/Listener.java b/src/main/java/org/openslx/filetransfer/Listener.java index e4e99e9..e6bbb62 100644 --- a/src/main/java/org/openslx/filetransfer/Listener.java +++ b/src/main/java/org/openslx/filetransfer/Listener.java @@ -1,8 +1,9 @@ package org.openslx.filetransfer; -import java.io.IOException; +import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.Socket; +import java.net.SocketTimeoutException; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLServerSocketFactory; @@ -16,6 +17,7 @@ public class Listener private final int port; private ServerSocket listenSocket = null; private Thread acceptThread = null; + private final int readTimeoutMs; private static final byte U = 85; // hex - code 'U' = 85. private static final byte D = 68; // hex - code 'D' = 68. @@ -30,12 +32,14 @@ public class Listener * @param context the SSL context used for encryption; if null, unencrypted connections will be * used * @param port port to listen on + * @param timeoutMs socket timeout for accepted connections */ - public Listener( IncomingEvent e, SSLContext context, int port ) + public Listener( IncomingEvent e, SSLContext context, int port, int readTimeoutMs ) { this.incomingEvent = e; this.context = context; this.port = port; + this.readTimeoutMs = readTimeoutMs; } /***********************************************************************/ @@ -48,13 +52,15 @@ public class Listener { try { if ( this.context == null ) { - listenSocket = new ServerSocket( this.port ); + listenSocket = new ServerSocket(); } else { SSLServerSocketFactory sslServerSocketFactory = context.getServerSocketFactory(); - listenSocket = sslServerSocketFactory.createServerSocket( this.port ); + listenSocket = sslServerSocketFactory.createServerSocket(); } + listenSocket.setReuseAddress( true ); + listenSocket.bind( new InetSocketAddress( this.port ) ); } catch ( Exception e ) { - log.error( "Cannot listen on port " + this.port ); + log.error( "Cannot listen on port " + this.port, e ); return false; } return true; @@ -63,7 +69,7 @@ public class Listener private void run() { final Listener instance = this; - acceptThread = new Thread() { + acceptThread = new Thread( "BFTP-Listen-" + this.port ) { @Override public void run() { @@ -72,34 +78,44 @@ public class Listener Socket connectionSocket = null; try { connectionSocket = listenSocket.accept(); + } catch ( SocketTimeoutException e ) { + continue; + } catch ( Exception e ) { + log.warn( "Some exception when accepting! Trying to resume...", e ); + Transfer.safeClose( listenSocket ); + if ( !listen() ) { + log.error( "Could not re-open listening socket" ); + break; + } + continue; + } + try { connectionSocket.setSoTimeout( 2000 ); // 2 second timeout enough? Maybe even use a small thread pool for handling accepted connections byte[] b = new byte[ 1 ]; int length = connectionSocket.getInputStream().read( b ); + if ( length == -1 ) + continue; - connectionSocket.setSoTimeout( 10000 ); - - log.debug( "Length (Listener): " + length ); + connectionSocket.setSoTimeout( readTimeoutMs ); if ( b[0] == U ) { - log.debug( "recognized U --> starting Downloader" ); // --> start Downloader(socket). Downloader d = new Downloader( connectionSocket ); incomingEvent.incomingUploadRequest( d ); } else if ( b[0] == D ) { - log.debug( "recognized D --> starting Uploader" ); // --> start Uploader(socket). Uploader u = new Uploader( connectionSocket ); incomingEvent.incomingDownloadRequest( u ); } else { - log.debug( "Got invalid option ... close connection" ); + log.debug( "Got invalid init-byte ... close connection" ); connectionSocket.close(); } - } catch ( IOException e ) { - // TODO Auto-generated catch block - e.printStackTrace(); + } catch ( Exception e ) { + log.warn( "Error accepting client", e ); + Transfer.safeClose( connectionSocket ); } } } finally { @@ -110,6 +126,7 @@ public class Listener } } }; + acceptThread.setDaemon( true ); acceptThread.start(); log.info( "Starting to accept " + ( this.context == null ? "UNENCRYPTED" : "encrypted" ) + " connections on port " + this.port ); } diff --git a/src/main/java/org/openslx/filetransfer/Transfer.java b/src/main/java/org/openslx/filetransfer/Transfer.java index 3e278c8..fc3d1d8 100644 --- a/src/main/java/org/openslx/filetransfer/Transfer.java +++ b/src/main/java/org/openslx/filetransfer/Transfer.java @@ -34,7 +34,7 @@ public abstract class Transfer * @param log Logger to use * @throws IOException */ - protected Transfer( String host, int port, SSLContext context, Logger log ) throws IOException + protected Transfer( String host, int port, int readTimeoutMs, SSLContext context, Logger log ) throws IOException { this.log = log; // create socket. @@ -44,7 +44,7 @@ public abstract class Transfer SSLSocketFactory sslSocketFactory = context.getSocketFactory(); transferSocket = sslSocketFactory.createSocket(); } - transferSocket.setSoTimeout( 10000 ); // set socket timeout. + transferSocket.setSoTimeout( readTimeoutMs ); transferSocket.connect( new InetSocketAddress( host, port ) ); outStream = new DataOutputStream( transferSocket.getOutputStream() ); @@ -196,7 +196,7 @@ public abstract class Transfer * Method for closing connection, if download has finished. * */ - public void close( String error, UploadStatusCallback callback, boolean sendToPeer ) + protected void close( String error, UploadStatusCallback callback, boolean sendToPeer ) { if ( error != null ) { if ( sendToPeer ) @@ -205,14 +205,30 @@ public abstract class Transfer callback.uploadError( error ); log.info( error ); } - safeClose( dataFromServer, outStream, transferSocket ); + synchronized ( transferSocket ) { + safeClose( dataFromServer, outStream, transferSocket ); + } } - public void close( String error ) + protected void close( String error ) { close( error, null, false ); } + public void cancel() + { + synchronized ( transferSocket ) { + if ( isValid() ) { + try { + transferSocket.shutdownInput(); + transferSocket.shutdownOutput(); + } catch ( Exception e ) { + // Silence + } + } + } + } + /** * Returns whether this transfer/connection is considered valid or usable, * which means the socket is still properly connected to the remote peer. @@ -221,8 +237,10 @@ public abstract class Transfer */ public boolean isValid() { - return transferSocket.isConnected() && !transferSocket.isClosed() - && !transferSocket.isInputShutdown() && !transferSocket.isOutputShutdown(); + synchronized ( transferSocket ) { + return transferSocket.isConnected() && !transferSocket.isClosed() + && !transferSocket.isInputShutdown() && !transferSocket.isOutputShutdown(); + } } /** diff --git a/src/main/java/org/openslx/filetransfer/Uploader.java b/src/main/java/org/openslx/filetransfer/Uploader.java index 748b1e2..92da8ea 100644 --- a/src/main/java/org/openslx/filetransfer/Uploader.java +++ b/src/main/java/org/openslx/filetransfer/Uploader.java @@ -24,9 +24,9 @@ public class Uploader extends Transfer * @param context ssl context for establishing a secure connection * @throws IOException */ - public Uploader( String host, int port, SSLContext context, String token ) throws IOException + public Uploader( String host, int port, int readTimeoutMs, SSLContext context, String token ) throws IOException { - super( host, port, context, log ); + super( host, port, readTimeoutMs, context, log ); outStream.writeByte( 'U' ); if ( !sendToken( token ) || !sendEndOfMeta() ) throw new IOException( "Sending token failed" ); @@ -141,7 +141,7 @@ public class Uploader extends Transfer } } } finally { - Transfer.safeClose( file ); + Transfer.safeClose( file, transferSocket ); } return true; } diff --git a/src/main/thrift/bwlp.thrift b/src/main/thrift/bwlp.thrift index 34b6461..3edbe5a 100644 --- a/src/main/thrift/bwlp.thrift +++ b/src/main/thrift/bwlp.thrift @@ -149,6 +149,8 @@ struct ImageBaseWrite { 5: bool isTemplate, 6: ImagePermissions defaultPermissions, 7: ShareMode shareMode, + 8: optional list addTags, + 9: optional list remTags, } struct ImageVersionWrite { @@ -229,11 +231,12 @@ struct LectureWrite { 7: UnixTimestamp endTime, 9: string runscript, 10: list nics, - 11: optional list allowedUsers, // allowed to see/select image in vmchooser. These are local accounts, not bwIDM/Master - 12: optional list networkExceptions, + 12: optional list networkExceptions, // Atomically replace rules 13: bool isExam, 14: bool hasInternetAccess, 15: LecturePermissions defaultPermissions, + 11: optional list addAllowedUsers, // add allowed to see/select image in vmchooser. These are local accounts, not bwIDM/Master + 16: optional list remAllowedUsers, // users to remove from that list } struct LectureSummary { @@ -280,6 +283,17 @@ struct LectureRead { 22: optional LecturePermissions userPermissions, } +struct MasterTag { + 1: string tag, + 2: UnixTimestamp createTime, +} + +struct MasterSoftware { + 1: string software, + 2: bool isRestricted, + 3: UnixTimestamp createTime, +} + struct TransferInformation { 1: string token, 2: i32 plainPort, @@ -465,10 +479,23 @@ service MasterServer { * Shared calls */ // Get list of known organizations with meta data - list getOrganizations(), + list getOrganizations() + throws (1:TInternalServerError serverError), - list getOperatingSystems(), + // List of known/defined operating systems + list getOperatingSystems() + throws (1:TInternalServerError serverError), - list getVirtualizers(), + // List of known/defined virtualizers + list getVirtualizers() + throws (1:TInternalServerError serverError), + + // List of "official" tags, starting from specific date + list getTags(1:UnixTimestamp startDate) + throws (1:TInternalServerError serverError), + + // List of "official" software, starting from specific date + list getSoftware(1:UnixTimestamp startDate) + throws (1:TInternalServerError serverError), } -- cgit v1.2.3-55-g7522