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 ++++++++++++++++++++- 1 file changed, 306 insertions(+), 3 deletions(-) (limited to 'src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.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); + } } } -- cgit v1.2.3-55-g7522