diff options
-rw-r--r-- | src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java | 133 | ||||
-rw-r--r-- | src/main/java/org/openslx/bwlp/thrift/iface/SscMode.java | 51 | ||||
-rw-r--r-- | src/main/thrift/bwlp.thrift | 9 |
3 files changed, 188 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 08482a7..4737596 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 = "2017-01-24") +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-02-22") 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"); @@ -47,6 +47,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, 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 org.apache.thrift.protocol.TField ALLOW_LOGIN_BY_DEFAULT_FIELD_DESC = new org.apache.thrift.protocol.TField("allowLoginByDefault", org.apache.thrift.protocol.TType.BOOL, (short)9); + private static final org.apache.thrift.protocol.TField SERVER_SIDE_COPY_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSideCopy", org.apache.thrift.protocol.TType.I32, (short)10); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -63,6 +64,11 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, public int maxConnectionsPerTransfer; // optional public int maxLocationsPerLecture; // optional public boolean allowLoginByDefault; // optional + /** + * + * @see SscMode + */ + public SscMode serverSideCopy; // 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 { @@ -74,7 +80,12 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, MAX_TRANSFERS((short)6, "maxTransfers"), MAX_CONNECTIONS_PER_TRANSFER((short)7, "maxConnectionsPerTransfer"), MAX_LOCATIONS_PER_LECTURE((short)8, "maxLocationsPerLecture"), - ALLOW_LOGIN_BY_DEFAULT((short)9, "allowLoginByDefault"); + ALLOW_LOGIN_BY_DEFAULT((short)9, "allowLoginByDefault"), + /** + * + * @see SscMode + */ + SERVER_SIDE_COPY((short)10, "serverSideCopy"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -107,6 +118,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return MAX_LOCATIONS_PER_LECTURE; case 9: // ALLOW_LOGIN_BY_DEFAULT return ALLOW_LOGIN_BY_DEFAULT; + case 10: // SERVER_SIDE_COPY + return SERVER_SIDE_COPY; default: return null; } @@ -155,7 +168,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, private static final int __MAXLOCATIONSPERLECTURE_ISSET_ID = 5; private static final int __ALLOWLOGINBYDEFAULT_ISSET_ID = 6; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.MAX_TRANSFERS,_Fields.MAX_CONNECTIONS_PER_TRANSFER,_Fields.MAX_LOCATIONS_PER_LECTURE,_Fields.ALLOW_LOGIN_BY_DEFAULT}; + private static final _Fields optionals[] = {_Fields.MAX_TRANSFERS,_Fields.MAX_CONNECTIONS_PER_TRANSFER,_Fields.MAX_LOCATIONS_PER_LECTURE,_Fields.ALLOW_LOGIN_BY_DEFAULT,_Fields.SERVER_SIDE_COPY}; 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); @@ -177,6 +190,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.ALLOW_LOGIN_BY_DEFAULT, new org.apache.thrift.meta_data.FieldMetaData("allowLoginByDefault", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.SERVER_SIDE_COPY, new org.apache.thrift.meta_data.FieldMetaData("serverSideCopy", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SscMode.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SatelliteConfig.class, metaDataMap); } @@ -220,6 +235,9 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, this.maxConnectionsPerTransfer = other.maxConnectionsPerTransfer; this.maxLocationsPerLecture = other.maxLocationsPerLecture; this.allowLoginByDefault = other.allowLoginByDefault; + if (other.isSetServerSideCopy()) { + this.serverSideCopy = other.serverSideCopy; + } } public SatelliteConfig deepCopy() { @@ -244,6 +262,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, this.maxLocationsPerLecture = 0; setAllowLoginByDefaultIsSet(false); this.allowLoginByDefault = false; + this.serverSideCopy = null; } public int getPageSize() { @@ -455,6 +474,38 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ALLOWLOGINBYDEFAULT_ISSET_ID, value); } + /** + * + * @see SscMode + */ + public SscMode getServerSideCopy() { + return this.serverSideCopy; + } + + /** + * + * @see SscMode + */ + public SatelliteConfig setServerSideCopy(SscMode serverSideCopy) { + this.serverSideCopy = serverSideCopy; + return this; + } + + public void unsetServerSideCopy() { + this.serverSideCopy = null; + } + + /** Returns true if field serverSideCopy is set (has been assigned a value) and false otherwise */ + public boolean isSetServerSideCopy() { + return this.serverSideCopy != null; + } + + public void setServerSideCopyIsSet(boolean value) { + if (!value) { + this.serverSideCopy = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case PAGE_SIZE: @@ -529,6 +580,14 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, } break; + case SERVER_SIDE_COPY: + if (value == null) { + unsetServerSideCopy(); + } else { + setServerSideCopy((SscMode)value); + } + break; + } } @@ -561,6 +620,9 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, case ALLOW_LOGIN_BY_DEFAULT: return isAllowLoginByDefault(); + case SERVER_SIDE_COPY: + return getServerSideCopy(); + } throw new IllegalStateException(); } @@ -590,6 +652,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return isSetMaxLocationsPerLecture(); case ALLOW_LOGIN_BY_DEFAULT: return isSetAllowLoginByDefault(); + case SERVER_SIDE_COPY: + return isSetServerSideCopy(); } throw new IllegalStateException(); } @@ -688,6 +752,15 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return false; } + boolean this_present_serverSideCopy = true && this.isSetServerSideCopy(); + boolean that_present_serverSideCopy = true && that.isSetServerSideCopy(); + if (this_present_serverSideCopy || that_present_serverSideCopy) { + if (!(this_present_serverSideCopy && that_present_serverSideCopy)) + return false; + if (!this.serverSideCopy.equals(that.serverSideCopy)) + return false; + } + return true; } @@ -740,6 +813,11 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (present_allowLoginByDefault) list.add(allowLoginByDefault); + boolean present_serverSideCopy = true && (isSetServerSideCopy()); + list.add(present_serverSideCopy); + if (present_serverSideCopy) + list.add(serverSideCopy.getValue()); + return list.hashCode(); } @@ -841,6 +919,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, return lastComparison; } } + lastComparison = Boolean.valueOf(isSetServerSideCopy()).compareTo(other.isSetServerSideCopy()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetServerSideCopy()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSideCopy, other.serverSideCopy); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -912,6 +1000,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, sb.append(this.allowLoginByDefault); first = false; } + if (isSetServerSideCopy()) { + if (!first) sb.append(", "); + sb.append("serverSideCopy:"); + if (this.serverSideCopy == null) { + sb.append("null"); + } else { + sb.append(this.serverSideCopy); + } + first = false; + } sb.append(")"); return sb.toString(); } @@ -1037,6 +1135,14 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 10: // SERVER_SIDE_COPY + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.serverSideCopy = org.openslx.bwlp.thrift.iface.SscMode.findByValue(iprot.readI32()); + struct.setServerSideCopyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1091,6 +1197,13 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, oprot.writeBool(struct.allowLoginByDefault); oprot.writeFieldEnd(); } + if (struct.serverSideCopy != null) { + if (struct.isSetServerSideCopy()) { + oprot.writeFieldBegin(SERVER_SIDE_COPY_FIELD_DESC); + oprot.writeI32(struct.serverSideCopy.getValue()); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -1136,7 +1249,10 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (struct.isSetAllowLoginByDefault()) { optionals.set(8); } - oprot.writeBitSet(optionals, 9); + if (struct.isSetServerSideCopy()) { + optionals.set(9); + } + oprot.writeBitSet(optionals, 10); if (struct.isSetPageSize()) { oprot.writeI32(struct.pageSize); } @@ -1164,12 +1280,15 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, if (struct.isSetAllowLoginByDefault()) { oprot.writeBool(struct.allowLoginByDefault); } + if (struct.isSetServerSideCopy()) { + oprot.writeI32(struct.serverSideCopy.getValue()); + } } @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(9); + BitSet incoming = iprot.readBitSet(10); if (incoming.get(0)) { struct.pageSize = iprot.readI32(); struct.setPageSizeIsSet(true); @@ -1208,6 +1327,10 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, struct.allowLoginByDefault = iprot.readBool(); struct.setAllowLoginByDefaultIsSet(true); } + if (incoming.get(9)) { + struct.serverSideCopy = org.openslx.bwlp.thrift.iface.SscMode.findByValue(iprot.readI32()); + struct.setServerSideCopyIsSet(true); + } } } diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SscMode.java b/src/main/java/org/openslx/bwlp/thrift/iface/SscMode.java new file mode 100644 index 0000000..dae1b41 --- /dev/null +++ b/src/main/java/org/openslx/bwlp/thrift/iface/SscMode.java @@ -0,0 +1,51 @@ +/** + * Autogenerated by Thrift Compiler (0.9.3) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.openslx.bwlp.thrift.iface; + + +import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum SscMode implements org.apache.thrift.TEnum { + OFF(0), + ON(1), + AUTO(2), + USER(3); + + private final int value; + + private SscMode(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static SscMode findByValue(int value) { + switch (value) { + case 0: + return OFF; + case 1: + return ON; + case 2: + return AUTO; + case 3: + return USER; + default: + return null; + } + } +} diff --git a/src/main/thrift/bwlp.thrift b/src/main/thrift/bwlp.thrift index bed99f8..308b62b 100644 --- a/src/main/thrift/bwlp.thrift +++ b/src/main/thrift/bwlp.thrift @@ -76,6 +76,13 @@ enum NetShareAuth { OTHER_USER } +enum SscMode { + OFF, + ON, + AUTO, + USER, +} + // ############## STRUCT ############### struct UserInfo { @@ -403,6 +410,8 @@ struct SatelliteConfig { 8: optional i32 maxLocationsPerLecture, // Whether users connecting to the sat for the first time are allowed to login 9: optional bool allowLoginByDefault, + // ServerSide Copy on, off, auto or controlled by user + 10: optional SscMode serverSideCopy, } struct SatelliteStatus { |