summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonathan Bauer2016-03-05 12:03:14 +0100
committerJonathan Bauer2016-03-05 12:03:14 +0100
commitce2f530de5330c1843d6df1ef300448eb718c275 (patch)
tree14fc752f84c9deb705336cb41ed232ad3f6a1a91 /src
parentadded hasUsbAccess field to Lecture* Struct (diff)
downloadmaster-sync-shared-ce2f530de5330c1843d6df1ef300448eb718c275.tar.gz
master-sync-shared-ce2f530de5330c1843d6df1ef300448eb718c275.tar.xz
master-sync-shared-ce2f530de5330c1843d6df1ef300448eb718c275.zip
remove ruleId from NetRule struct
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/NetRule.java117
-rw-r--r--src/main/thrift/bwlp.thrift1
2 files changed, 9 insertions, 109 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/NetRule.java b/src/main/java/org/openslx/bwlp/thrift/iface/NetRule.java
index 98d3370..8fcabe9 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/NetRule.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/NetRule.java
@@ -34,11 +34,10 @@ 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-03-04")
public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields>, java.io.Serializable, Cloneable, Comparable<NetRule> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NetRule");
- private static final org.apache.thrift.protocol.TField RULE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ruleId", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField DIRECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("direction", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("host", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)4);
@@ -49,7 +48,6 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
schemes.put(TupleScheme.class, new NetRuleTupleSchemeFactory());
}
- public int ruleId; // required
/**
*
* @see NetDirection
@@ -60,7 +58,6 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- RULE_ID((short)1, "ruleId"),
/**
*
* @see NetDirection
@@ -82,8 +79,6 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
- case 1: // RULE_ID
- return RULE_ID;
case 2: // DIRECTION
return DIRECTION;
case 3: // HOST
@@ -130,14 +125,11 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
}
// isset id assignments
- private static final int __RULEID_ISSET_ID = 0;
- private static final int __PORT_ISSET_ID = 1;
+ private static final int __PORT_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.RULE_ID, new org.apache.thrift.meta_data.FieldMetaData("ruleId", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.DIRECTION, new org.apache.thrift.meta_data.FieldMetaData("direction", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, NetDirection.class)));
tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -152,14 +144,11 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
}
public NetRule(
- int ruleId,
NetDirection direction,
String host,
int port)
{
this();
- this.ruleId = ruleId;
- setRuleIdIsSet(true);
this.direction = direction;
this.host = host;
this.port = port;
@@ -171,7 +160,6 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
*/
public NetRule(NetRule other) {
__isset_bitfield = other.__isset_bitfield;
- this.ruleId = other.ruleId;
if (other.isSetDirection()) {
this.direction = other.direction;
}
@@ -187,37 +175,12 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
@Override
public void clear() {
- setRuleIdIsSet(false);
- this.ruleId = 0;
this.direction = null;
this.host = null;
setPortIsSet(false);
this.port = 0;
}
- public int getRuleId() {
- return this.ruleId;
- }
-
- public NetRule setRuleId(int ruleId) {
- this.ruleId = ruleId;
- setRuleIdIsSet(true);
- return this;
- }
-
- public void unsetRuleId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RULEID_ISSET_ID);
- }
-
- /** Returns true if field ruleId is set (has been assigned a value) and false otherwise */
- public boolean isSetRuleId() {
- return EncodingUtils.testBit(__isset_bitfield, __RULEID_ISSET_ID);
- }
-
- public void setRuleIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RULEID_ISSET_ID, value);
- }
-
/**
*
* @see NetDirection
@@ -299,14 +262,6 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case RULE_ID:
- if (value == null) {
- unsetRuleId();
- } else {
- setRuleId((Integer)value);
- }
- break;
-
case DIRECTION:
if (value == null) {
unsetDirection();
@@ -336,9 +291,6 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
public Object getFieldValue(_Fields field) {
switch (field) {
- case RULE_ID:
- return getRuleId();
-
case DIRECTION:
return getDirection();
@@ -359,8 +311,6 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
}
switch (field) {
- case RULE_ID:
- return isSetRuleId();
case DIRECTION:
return isSetDirection();
case HOST:
@@ -384,15 +334,6 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
if (that == null)
return false;
- boolean this_present_ruleId = true;
- boolean that_present_ruleId = true;
- if (this_present_ruleId || that_present_ruleId) {
- if (!(this_present_ruleId && that_present_ruleId))
- return false;
- if (this.ruleId != that.ruleId)
- return false;
- }
-
boolean this_present_direction = true && this.isSetDirection();
boolean that_present_direction = true && that.isSetDirection();
if (this_present_direction || that_present_direction) {
@@ -427,11 +368,6 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
public int hashCode() {
List<Object> list = new ArrayList<Object>();
- boolean present_ruleId = true;
- list.add(present_ruleId);
- if (present_ruleId)
- list.add(ruleId);
-
boolean present_direction = true && (isSetDirection());
list.add(present_direction);
if (present_direction)
@@ -458,16 +394,6 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetRuleId()).compareTo(other.isSetRuleId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetRuleId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ruleId, other.ruleId);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
lastComparison = Boolean.valueOf(isSetDirection()).compareTo(other.isSetDirection());
if (lastComparison != 0) {
return lastComparison;
@@ -518,10 +444,6 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
StringBuilder sb = new StringBuilder("NetRule(");
boolean first = true;
- sb.append("ruleId:");
- sb.append(this.ruleId);
- first = false;
- if (!first) sb.append(", ");
sb.append("direction:");
if (this.direction == null) {
sb.append("null");
@@ -586,14 +508,6 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
break;
}
switch (schemeField.id) {
- case 1: // RULE_ID
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.ruleId = iprot.readI32();
- struct.setRuleIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
case 2: // DIRECTION
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.direction = org.openslx.bwlp.thrift.iface.NetDirection.findByValue(iprot.readI32());
@@ -633,9 +547,6 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(RULE_ID_FIELD_DESC);
- oprot.writeI32(struct.ruleId);
- oprot.writeFieldEnd();
if (struct.direction != null) {
oprot.writeFieldBegin(DIRECTION_FIELD_DESC);
oprot.writeI32(struct.direction.getValue());
@@ -667,22 +578,16 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
public void write(org.apache.thrift.protocol.TProtocol prot, NetRule struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
- if (struct.isSetRuleId()) {
- optionals.set(0);
- }
if (struct.isSetDirection()) {
- optionals.set(1);
+ optionals.set(0);
}
if (struct.isSetHost()) {
- optionals.set(2);
+ optionals.set(1);
}
if (struct.isSetPort()) {
- optionals.set(3);
- }
- oprot.writeBitSet(optionals, 4);
- if (struct.isSetRuleId()) {
- oprot.writeI32(struct.ruleId);
+ optionals.set(2);
}
+ oprot.writeBitSet(optionals, 3);
if (struct.isSetDirection()) {
oprot.writeI32(struct.direction.getValue());
}
@@ -697,20 +602,16 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NetRule struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
- struct.ruleId = iprot.readI32();
- struct.setRuleIdIsSet(true);
- }
- if (incoming.get(1)) {
struct.direction = org.openslx.bwlp.thrift.iface.NetDirection.findByValue(iprot.readI32());
struct.setDirectionIsSet(true);
}
- if (incoming.get(2)) {
+ if (incoming.get(1)) {
struct.host = iprot.readString();
struct.setHostIsSet(true);
}
- if (incoming.get(3)) {
+ if (incoming.get(2)) {
struct.port = iprot.readI32();
struct.setPortIsSet(true);
}
diff --git a/src/main/thrift/bwlp.thrift b/src/main/thrift/bwlp.thrift
index b0a7bb3..e5478d1 100644
--- a/src/main/thrift/bwlp.thrift
+++ b/src/main/thrift/bwlp.thrift
@@ -230,7 +230,6 @@ struct ImagePublishData {
}
struct NetRule {
- 1: i32 ruleId,
2: NetDirection direction,
3: string host,
4: i32 port,