diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java | 110 | ||||
-rw-r--r-- | src/main/thrift/bwlp.thrift | 2 |
2 files changed, 107 insertions, 5 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java index 6535b44..f9ec5f2 100644 --- a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java +++ b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java @@ -34,7 +34,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-01-04") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-01-19") public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, SatelliteConfig._Fields>, java.io.Serializable, Cloneable, Comparable<SatelliteConfig> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SatelliteConfig"); @@ -45,6 +45,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, private static final org.apache.thrift.protocol.TField MAX_LECTURE_VALIDITY_DAYS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxLectureValidityDays", org.apache.thrift.protocol.TType.I32, (short)5); private static final org.apache.thrift.protocol.TField MAX_TRANSFERS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxTransfers", org.apache.thrift.protocol.TType.I32, (short)6); private static final org.apache.thrift.protocol.TField MAX_CONNECTIONS_PER_TRANSFER_FIELD_DESC = new org.apache.thrift.protocol.TField("maxConnectionsPerTransfer", org.apache.thrift.protocol.TType.I32, (short)7); + private static final org.apache.thrift.protocol.TField MAX_LOCATIONS_PER_LECTURE_FIELD_DESC = new org.apache.thrift.protocol.TField("maxLocationsPerLecture", org.apache.thrift.protocol.TType.I32, (short)8); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -59,6 +60,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, public int maxLectureValidityDays; // required public int maxTransfers; // optional public int maxConnectionsPerTransfer; // optional + public int maxLocationsPerLecture; // 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 { @@ -68,7 +70,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, MAX_IMAGE_VALIDITY_DAYS((short)4, "maxImageValidityDays"), MAX_LECTURE_VALIDITY_DAYS((short)5, "maxLectureValidityDays"), MAX_TRANSFERS((short)6, "maxTransfers"), - MAX_CONNECTIONS_PER_TRANSFER((short)7, "maxConnectionsPerTransfer"); + MAX_CONNECTIONS_PER_TRANSFER((short)7, "maxConnectionsPerTransfer"), + MAX_LOCATIONS_PER_LECTURE((short)8, "maxLocationsPerLecture"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -97,6 +100,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return MAX_TRANSFERS; case 7: // MAX_CONNECTIONS_PER_TRANSFER return MAX_CONNECTIONS_PER_TRANSFER; + case 8: // MAX_LOCATIONS_PER_LECTURE + return MAX_LOCATIONS_PER_LECTURE; default: return null; } @@ -142,8 +147,9 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, private static final int __MAXLECTUREVALIDITYDAYS_ISSET_ID = 2; private static final int __MAXTRANSFERS_ISSET_ID = 3; private static final int __MAXCONNECTIONSPERTRANSFER_ISSET_ID = 4; + private static final int __MAXLOCATIONSPERLECTURE_ISSET_ID = 5; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.MAX_TRANSFERS,_Fields.MAX_CONNECTIONS_PER_TRANSFER}; + private static final _Fields optionals[] = {_Fields.MAX_TRANSFERS,_Fields.MAX_CONNECTIONS_PER_TRANSFER,_Fields.MAX_LOCATIONS_PER_LECTURE}; 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); @@ -161,6 +167,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.MAX_CONNECTIONS_PER_TRANSFER, new org.apache.thrift.meta_data.FieldMetaData("maxConnectionsPerTransfer", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.MAX_LOCATIONS_PER_LECTURE, new org.apache.thrift.meta_data.FieldMetaData("maxLocationsPerLecture", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SatelliteConfig.class, metaDataMap); } @@ -202,6 +210,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, this.maxLectureValidityDays = other.maxLectureValidityDays; this.maxTransfers = other.maxTransfers; this.maxConnectionsPerTransfer = other.maxConnectionsPerTransfer; + this.maxLocationsPerLecture = other.maxLocationsPerLecture; } public SatelliteConfig deepCopy() { @@ -222,6 +231,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, this.maxTransfers = 0; setMaxConnectionsPerTransferIsSet(false); this.maxConnectionsPerTransfer = 0; + setMaxLocationsPerLectureIsSet(false); + this.maxLocationsPerLecture = 0; } public int getPageSize() { @@ -387,6 +398,29 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXCONNECTIONSPERTRANSFER_ISSET_ID, value); } + public int getMaxLocationsPerLecture() { + return this.maxLocationsPerLecture; + } + + public SatelliteConfig setMaxLocationsPerLecture(int maxLocationsPerLecture) { + this.maxLocationsPerLecture = maxLocationsPerLecture; + setMaxLocationsPerLectureIsSet(true); + return this; + } + + public void unsetMaxLocationsPerLecture() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXLOCATIONSPERLECTURE_ISSET_ID); + } + + /** Returns true if field maxLocationsPerLecture is set (has been assigned a value) and false otherwise */ + public boolean isSetMaxLocationsPerLecture() { + return EncodingUtils.testBit(__isset_bitfield, __MAXLOCATIONSPERLECTURE_ISSET_ID); + } + + public void setMaxLocationsPerLectureIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXLOCATIONSPERLECTURE_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case PAGE_SIZE: @@ -445,6 +479,14 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } break; + case MAX_LOCATIONS_PER_LECTURE: + if (value == null) { + unsetMaxLocationsPerLecture(); + } else { + setMaxLocationsPerLecture((Integer)value); + } + break; + } } @@ -471,6 +513,9 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, case MAX_CONNECTIONS_PER_TRANSFER: return getMaxConnectionsPerTransfer(); + case MAX_LOCATIONS_PER_LECTURE: + return getMaxLocationsPerLecture(); + } throw new IllegalStateException(); } @@ -496,6 +541,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return isSetMaxTransfers(); case MAX_CONNECTIONS_PER_TRANSFER: return isSetMaxConnectionsPerTransfer(); + case MAX_LOCATIONS_PER_LECTURE: + return isSetMaxLocationsPerLecture(); } throw new IllegalStateException(); } @@ -576,6 +623,15 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return false; } + boolean this_present_maxLocationsPerLecture = true && this.isSetMaxLocationsPerLecture(); + boolean that_present_maxLocationsPerLecture = true && that.isSetMaxLocationsPerLecture(); + if (this_present_maxLocationsPerLecture || that_present_maxLocationsPerLecture) { + if (!(this_present_maxLocationsPerLecture && that_present_maxLocationsPerLecture)) + return false; + if (this.maxLocationsPerLecture != that.maxLocationsPerLecture) + return false; + } + return true; } @@ -618,6 +674,11 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (present_maxConnectionsPerTransfer) list.add(maxConnectionsPerTransfer); + boolean present_maxLocationsPerLecture = true && (isSetMaxLocationsPerLecture()); + list.add(present_maxLocationsPerLecture); + if (present_maxLocationsPerLecture) + list.add(maxLocationsPerLecture); + return list.hashCode(); } @@ -699,6 +760,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return lastComparison; } } + lastComparison = Boolean.valueOf(isSetMaxLocationsPerLecture()).compareTo(other.isSetMaxLocationsPerLecture()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMaxLocationsPerLecture()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxLocationsPerLecture, other.maxLocationsPerLecture); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -758,6 +829,12 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, sb.append(this.maxConnectionsPerTransfer); first = false; } + if (isSetMaxLocationsPerLecture()) { + if (!first) sb.append(", "); + sb.append("maxLocationsPerLecture:"); + sb.append(this.maxLocationsPerLecture); + first = false; + } sb.append(")"); return sb.toString(); } @@ -867,6 +944,14 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 8: // MAX_LOCATIONS_PER_LECTURE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.maxLocationsPerLecture = iprot.readI32(); + struct.setMaxLocationsPerLectureIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -911,6 +996,11 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, oprot.writeI32(struct.maxConnectionsPerTransfer); oprot.writeFieldEnd(); } + if (struct.isSetMaxLocationsPerLecture()) { + oprot.writeFieldBegin(MAX_LOCATIONS_PER_LECTURE_FIELD_DESC); + oprot.writeI32(struct.maxLocationsPerLecture); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -950,7 +1040,10 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (struct.isSetMaxConnectionsPerTransfer()) { optionals.set(6); } - oprot.writeBitSet(optionals, 7); + if (struct.isSetMaxLocationsPerLecture()) { + optionals.set(7); + } + oprot.writeBitSet(optionals, 8); if (struct.isSetPageSize()) { oprot.writeI32(struct.pageSize); } @@ -972,12 +1065,15 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (struct.isSetMaxConnectionsPerTransfer()) { oprot.writeI32(struct.maxConnectionsPerTransfer); } + if (struct.isSetMaxLocationsPerLecture()) { + oprot.writeI32(struct.maxLocationsPerLecture); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, SatelliteConfig struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(7); + BitSet incoming = iprot.readBitSet(8); if (incoming.get(0)) { struct.pageSize = iprot.readI32(); struct.setPageSizeIsSet(true); @@ -1008,6 +1104,10 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, struct.maxConnectionsPerTransfer = iprot.readI32(); struct.setMaxConnectionsPerTransferIsSet(true); } + if (incoming.get(7)) { + struct.maxLocationsPerLecture = iprot.readI32(); + struct.setMaxLocationsPerLectureIsSet(true); + } } } diff --git a/src/main/thrift/bwlp.thrift b/src/main/thrift/bwlp.thrift index 58c58d2..b0d54bc 100644 --- a/src/main/thrift/bwlp.thrift +++ b/src/main/thrift/bwlp.thrift @@ -347,6 +347,8 @@ struct SatelliteConfig { 6: optional i32 maxTransfers, // Maximum number of connections per transfer 7: optional i32 maxConnectionsPerTransfer, + // Maximum number of locations per lecture + 8: optional i32 maxLocationsPerLecture, } struct SatelliteStatus { |