http://git-wip-us.apache.org/repos/asf/airavata/blob/14ff0916/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/BatchQueue.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/BatchQueue.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/BatchQueue.java index 550971d..a0d495e 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/BatchQueue.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/BatchQueue.java @@ -16,48 +16,21 @@ */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.10.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.airavata.model.appcatalog.computeresource; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) /** * Batch Queue Information on SuperComputers * * maxRunTime: * Maximum allowed run time in hours. */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") [email protected](value = "Autogenerated by Thrift Compiler (0.10.0)") public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueue._Fields>, java.io.Serializable, Cloneable, Comparable<BatchQueue> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BatchQueue"); @@ -75,14 +48,11 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu private static final org.apache.thrift.protocol.TField QUEUE_SPECIFIC_MACROS_FIELD_DESC = new org.apache.thrift.protocol.TField("queueSpecificMacros", org.apache.thrift.protocol.TType.STRING, (short)12); private static final org.apache.thrift.protocol.TField IS_DEFAULT_QUEUE_FIELD_DESC = new org.apache.thrift.protocol.TField("isDefaultQueue", org.apache.thrift.protocol.TType.BOOL, (short)13); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new BatchQueueStandardSchemeFactory()); - schemes.put(TupleScheme.class, new BatchQueueTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new BatchQueueStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new BatchQueueTupleSchemeFactory(); - private String queueName; // required - private String queueDescription; // optional + private java.lang.String queueName; // required + private java.lang.String queueDescription; // optional private int maxRunTime; // optional private int maxNodes; // optional private int maxProcessors; // optional @@ -92,7 +62,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu private int defaultNodeCount; // optional private int defaultCPUCount; // optional private int defaultWalltime; // optional - private String queueSpecificMacros; // optional + private java.lang.String queueSpecificMacros; // optional private boolean isDefaultQueue; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ @@ -111,10 +81,10 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu QUEUE_SPECIFIC_MACROS((short)12, "queueSpecificMacros"), IS_DEFAULT_QUEUE((short)13, "isDefaultQueue"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -161,21 +131,21 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.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) { + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -184,7 +154,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } @@ -202,9 +172,9 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu private static final int __ISDEFAULTQUEUE_ISSET_ID = 9; private short __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.QUEUE_DESCRIPTION,_Fields.MAX_RUN_TIME,_Fields.MAX_NODES,_Fields.MAX_PROCESSORS,_Fields.MAX_JOBS_IN_QUEUE,_Fields.MAX_MEMORY,_Fields.CPU_PER_NODE,_Fields.DEFAULT_NODE_COUNT,_Fields.DEFAULT_CPUCOUNT,_Fields.DEFAULT_WALLTIME,_Fields.QUEUE_SPECIFIC_MACROS,_Fields.IS_DEFAULT_QUEUE}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.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); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("queueName", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.QUEUE_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("queueDescription", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -231,7 +201,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.IS_DEFAULT_QUEUE, new org.apache.thrift.meta_data.FieldMetaData("isDefaultQueue", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BatchQueue.class, metaDataMap); } @@ -239,7 +209,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu } public BatchQueue( - String queueName) + java.lang.String queueName) { this(); this.queueName = queueName; @@ -302,11 +272,11 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu this.isDefaultQueue = false; } - public String getQueueName() { + public java.lang.String getQueueName() { return this.queueName; } - public void setQueueName(String queueName) { + public void setQueueName(java.lang.String queueName) { this.queueName = queueName; } @@ -325,11 +295,11 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu } } - public String getQueueDescription() { + public java.lang.String getQueueDescription() { return this.queueDescription; } - public void setQueueDescription(String queueDescription) { + public void setQueueDescription(java.lang.String queueDescription) { this.queueDescription = queueDescription; } @@ -358,16 +328,16 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu } public void unsetMaxRunTime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXRUNTIME_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXRUNTIME_ISSET_ID); } /** Returns true if field maxRunTime is set (has been assigned a value) and false otherwise */ public boolean isSetMaxRunTime() { - return EncodingUtils.testBit(__isset_bitfield, __MAXRUNTIME_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXRUNTIME_ISSET_ID); } public void setMaxRunTimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXRUNTIME_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXRUNTIME_ISSET_ID, value); } public int getMaxNodes() { @@ -380,16 +350,16 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu } public void unsetMaxNodes() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXNODES_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXNODES_ISSET_ID); } /** Returns true if field maxNodes is set (has been assigned a value) and false otherwise */ public boolean isSetMaxNodes() { - return EncodingUtils.testBit(__isset_bitfield, __MAXNODES_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXNODES_ISSET_ID); } public void setMaxNodesIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXNODES_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXNODES_ISSET_ID, value); } public int getMaxProcessors() { @@ -402,16 +372,16 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu } public void unsetMaxProcessors() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXPROCESSORS_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXPROCESSORS_ISSET_ID); } /** Returns true if field maxProcessors is set (has been assigned a value) and false otherwise */ public boolean isSetMaxProcessors() { - return EncodingUtils.testBit(__isset_bitfield, __MAXPROCESSORS_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXPROCESSORS_ISSET_ID); } public void setMaxProcessorsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXPROCESSORS_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXPROCESSORS_ISSET_ID, value); } public int getMaxJobsInQueue() { @@ -424,16 +394,16 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu } public void unsetMaxJobsInQueue() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXJOBSINQUEUE_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXJOBSINQUEUE_ISSET_ID); } /** Returns true if field maxJobsInQueue is set (has been assigned a value) and false otherwise */ public boolean isSetMaxJobsInQueue() { - return EncodingUtils.testBit(__isset_bitfield, __MAXJOBSINQUEUE_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXJOBSINQUEUE_ISSET_ID); } public void setMaxJobsInQueueIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXJOBSINQUEUE_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXJOBSINQUEUE_ISSET_ID, value); } public int getMaxMemory() { @@ -446,16 +416,16 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu } public void unsetMaxMemory() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXMEMORY_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXMEMORY_ISSET_ID); } /** Returns true if field maxMemory is set (has been assigned a value) and false otherwise */ public boolean isSetMaxMemory() { - return EncodingUtils.testBit(__isset_bitfield, __MAXMEMORY_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXMEMORY_ISSET_ID); } public void setMaxMemoryIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXMEMORY_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXMEMORY_ISSET_ID, value); } public int getCpuPerNode() { @@ -468,16 +438,16 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu } public void unsetCpuPerNode() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CPUPERNODE_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CPUPERNODE_ISSET_ID); } /** Returns true if field cpuPerNode is set (has been assigned a value) and false otherwise */ public boolean isSetCpuPerNode() { - return EncodingUtils.testBit(__isset_bitfield, __CPUPERNODE_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CPUPERNODE_ISSET_ID); } public void setCpuPerNodeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPUPERNODE_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CPUPERNODE_ISSET_ID, value); } public int getDefaultNodeCount() { @@ -490,16 +460,16 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu } public void unsetDefaultNodeCount() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEFAULTNODECOUNT_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DEFAULTNODECOUNT_ISSET_ID); } /** Returns true if field defaultNodeCount is set (has been assigned a value) and false otherwise */ public boolean isSetDefaultNodeCount() { - return EncodingUtils.testBit(__isset_bitfield, __DEFAULTNODECOUNT_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DEFAULTNODECOUNT_ISSET_ID); } public void setDefaultNodeCountIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEFAULTNODECOUNT_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DEFAULTNODECOUNT_ISSET_ID, value); } public int getDefaultCPUCount() { @@ -512,16 +482,16 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu } public void unsetDefaultCPUCount() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEFAULTCPUCOUNT_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DEFAULTCPUCOUNT_ISSET_ID); } /** Returns true if field defaultCPUCount is set (has been assigned a value) and false otherwise */ public boolean isSetDefaultCPUCount() { - return EncodingUtils.testBit(__isset_bitfield, __DEFAULTCPUCOUNT_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DEFAULTCPUCOUNT_ISSET_ID); } public void setDefaultCPUCountIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEFAULTCPUCOUNT_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DEFAULTCPUCOUNT_ISSET_ID, value); } public int getDefaultWalltime() { @@ -534,23 +504,23 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu } public void unsetDefaultWalltime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DEFAULTWALLTIME_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DEFAULTWALLTIME_ISSET_ID); } /** Returns true if field defaultWalltime is set (has been assigned a value) and false otherwise */ public boolean isSetDefaultWalltime() { - return EncodingUtils.testBit(__isset_bitfield, __DEFAULTWALLTIME_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DEFAULTWALLTIME_ISSET_ID); } public void setDefaultWalltimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DEFAULTWALLTIME_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DEFAULTWALLTIME_ISSET_ID, value); } - public String getQueueSpecificMacros() { + public java.lang.String getQueueSpecificMacros() { return this.queueSpecificMacros; } - public void setQueueSpecificMacros(String queueSpecificMacros) { + public void setQueueSpecificMacros(java.lang.String queueSpecificMacros) { this.queueSpecificMacros = queueSpecificMacros; } @@ -579,25 +549,25 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu } public void unsetIsDefaultQueue() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISDEFAULTQUEUE_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISDEFAULTQUEUE_ISSET_ID); } /** Returns true if field isDefaultQueue is set (has been assigned a value) and false otherwise */ public boolean isSetIsDefaultQueue() { - return EncodingUtils.testBit(__isset_bitfield, __ISDEFAULTQUEUE_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISDEFAULTQUEUE_ISSET_ID); } public void setIsDefaultQueueIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISDEFAULTQUEUE_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISDEFAULTQUEUE_ISSET_ID, value); } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case QUEUE_NAME: if (value == null) { unsetQueueName(); } else { - setQueueName((String)value); + setQueueName((java.lang.String)value); } break; @@ -605,7 +575,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu if (value == null) { unsetQueueDescription(); } else { - setQueueDescription((String)value); + setQueueDescription((java.lang.String)value); } break; @@ -613,7 +583,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu if (value == null) { unsetMaxRunTime(); } else { - setMaxRunTime((Integer)value); + setMaxRunTime((java.lang.Integer)value); } break; @@ -621,7 +591,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu if (value == null) { unsetMaxNodes(); } else { - setMaxNodes((Integer)value); + setMaxNodes((java.lang.Integer)value); } break; @@ -629,7 +599,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu if (value == null) { unsetMaxProcessors(); } else { - setMaxProcessors((Integer)value); + setMaxProcessors((java.lang.Integer)value); } break; @@ -637,7 +607,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu if (value == null) { unsetMaxJobsInQueue(); } else { - setMaxJobsInQueue((Integer)value); + setMaxJobsInQueue((java.lang.Integer)value); } break; @@ -645,7 +615,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu if (value == null) { unsetMaxMemory(); } else { - setMaxMemory((Integer)value); + setMaxMemory((java.lang.Integer)value); } break; @@ -653,7 +623,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu if (value == null) { unsetCpuPerNode(); } else { - setCpuPerNode((Integer)value); + setCpuPerNode((java.lang.Integer)value); } break; @@ -661,7 +631,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu if (value == null) { unsetDefaultNodeCount(); } else { - setDefaultNodeCount((Integer)value); + setDefaultNodeCount((java.lang.Integer)value); } break; @@ -669,7 +639,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu if (value == null) { unsetDefaultCPUCount(); } else { - setDefaultCPUCount((Integer)value); + setDefaultCPUCount((java.lang.Integer)value); } break; @@ -677,7 +647,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu if (value == null) { unsetDefaultWalltime(); } else { - setDefaultWalltime((Integer)value); + setDefaultWalltime((java.lang.Integer)value); } break; @@ -685,7 +655,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu if (value == null) { unsetQueueSpecificMacros(); } else { - setQueueSpecificMacros((String)value); + setQueueSpecificMacros((java.lang.String)value); } break; @@ -693,14 +663,14 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu if (value == null) { unsetIsDefaultQueue(); } else { - setIsDefaultQueue((Boolean)value); + setIsDefaultQueue((java.lang.Boolean)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case QUEUE_NAME: return getQueueName(); @@ -742,13 +712,13 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu return isIsDefaultQueue(); } - throw new IllegalStateException(); + throw new java.lang.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(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -779,11 +749,11 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu case IS_DEFAULT_QUEUE: return isSetIsDefaultQueue(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { + public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof BatchQueue) @@ -794,6 +764,8 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu public boolean equals(BatchQueue that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_queueName = true && this.isSetQueueName(); boolean that_present_queueName = true && that.isSetQueueName(); @@ -917,74 +889,61 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); - - boolean present_queueName = true && (isSetQueueName()); - list.add(present_queueName); - if (present_queueName) - list.add(queueName); - - boolean present_queueDescription = true && (isSetQueueDescription()); - list.add(present_queueDescription); - if (present_queueDescription) - list.add(queueDescription); - - boolean present_maxRunTime = true && (isSetMaxRunTime()); - list.add(present_maxRunTime); - if (present_maxRunTime) - list.add(maxRunTime); - - boolean present_maxNodes = true && (isSetMaxNodes()); - list.add(present_maxNodes); - if (present_maxNodes) - list.add(maxNodes); - - boolean present_maxProcessors = true && (isSetMaxProcessors()); - list.add(present_maxProcessors); - if (present_maxProcessors) - list.add(maxProcessors); - - boolean present_maxJobsInQueue = true && (isSetMaxJobsInQueue()); - list.add(present_maxJobsInQueue); - if (present_maxJobsInQueue) - list.add(maxJobsInQueue); - - boolean present_maxMemory = true && (isSetMaxMemory()); - list.add(present_maxMemory); - if (present_maxMemory) - list.add(maxMemory); - - boolean present_cpuPerNode = true && (isSetCpuPerNode()); - list.add(present_cpuPerNode); - if (present_cpuPerNode) - list.add(cpuPerNode); - - boolean present_defaultNodeCount = true && (isSetDefaultNodeCount()); - list.add(present_defaultNodeCount); - if (present_defaultNodeCount) - list.add(defaultNodeCount); - - boolean present_defaultCPUCount = true && (isSetDefaultCPUCount()); - list.add(present_defaultCPUCount); - if (present_defaultCPUCount) - list.add(defaultCPUCount); - - boolean present_defaultWalltime = true && (isSetDefaultWalltime()); - list.add(present_defaultWalltime); - if (present_defaultWalltime) - list.add(defaultWalltime); - - boolean present_queueSpecificMacros = true && (isSetQueueSpecificMacros()); - list.add(present_queueSpecificMacros); - if (present_queueSpecificMacros) - list.add(queueSpecificMacros); - - boolean present_isDefaultQueue = true && (isSetIsDefaultQueue()); - list.add(present_isDefaultQueue); - if (present_isDefaultQueue) - list.add(isDefaultQueue); - - return list.hashCode(); + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetQueueName()) ? 131071 : 524287); + if (isSetQueueName()) + hashCode = hashCode * 8191 + queueName.hashCode(); + + hashCode = hashCode * 8191 + ((isSetQueueDescription()) ? 131071 : 524287); + if (isSetQueueDescription()) + hashCode = hashCode * 8191 + queueDescription.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMaxRunTime()) ? 131071 : 524287); + if (isSetMaxRunTime()) + hashCode = hashCode * 8191 + maxRunTime; + + hashCode = hashCode * 8191 + ((isSetMaxNodes()) ? 131071 : 524287); + if (isSetMaxNodes()) + hashCode = hashCode * 8191 + maxNodes; + + hashCode = hashCode * 8191 + ((isSetMaxProcessors()) ? 131071 : 524287); + if (isSetMaxProcessors()) + hashCode = hashCode * 8191 + maxProcessors; + + hashCode = hashCode * 8191 + ((isSetMaxJobsInQueue()) ? 131071 : 524287); + if (isSetMaxJobsInQueue()) + hashCode = hashCode * 8191 + maxJobsInQueue; + + hashCode = hashCode * 8191 + ((isSetMaxMemory()) ? 131071 : 524287); + if (isSetMaxMemory()) + hashCode = hashCode * 8191 + maxMemory; + + hashCode = hashCode * 8191 + ((isSetCpuPerNode()) ? 131071 : 524287); + if (isSetCpuPerNode()) + hashCode = hashCode * 8191 + cpuPerNode; + + hashCode = hashCode * 8191 + ((isSetDefaultNodeCount()) ? 131071 : 524287); + if (isSetDefaultNodeCount()) + hashCode = hashCode * 8191 + defaultNodeCount; + + hashCode = hashCode * 8191 + ((isSetDefaultCPUCount()) ? 131071 : 524287); + if (isSetDefaultCPUCount()) + hashCode = hashCode * 8191 + defaultCPUCount; + + hashCode = hashCode * 8191 + ((isSetDefaultWalltime()) ? 131071 : 524287); + if (isSetDefaultWalltime()) + hashCode = hashCode * 8191 + defaultWalltime; + + hashCode = hashCode * 8191 + ((isSetQueueSpecificMacros()) ? 131071 : 524287); + if (isSetQueueSpecificMacros()) + hashCode = hashCode * 8191 + queueSpecificMacros.hashCode(); + + hashCode = hashCode * 8191 + ((isSetIsDefaultQueue()) ? 131071 : 524287); + if (isSetIsDefaultQueue()) + hashCode = hashCode * 8191 + ((isDefaultQueue) ? 131071 : 524287); + + return hashCode; } @Override @@ -995,7 +954,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName()); + lastComparison = java.lang.Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName()); if (lastComparison != 0) { return lastComparison; } @@ -1005,7 +964,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu return lastComparison; } } - lastComparison = Boolean.valueOf(isSetQueueDescription()).compareTo(other.isSetQueueDescription()); + lastComparison = java.lang.Boolean.valueOf(isSetQueueDescription()).compareTo(other.isSetQueueDescription()); if (lastComparison != 0) { return lastComparison; } @@ -1015,7 +974,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMaxRunTime()).compareTo(other.isSetMaxRunTime()); + lastComparison = java.lang.Boolean.valueOf(isSetMaxRunTime()).compareTo(other.isSetMaxRunTime()); if (lastComparison != 0) { return lastComparison; } @@ -1025,7 +984,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMaxNodes()).compareTo(other.isSetMaxNodes()); + lastComparison = java.lang.Boolean.valueOf(isSetMaxNodes()).compareTo(other.isSetMaxNodes()); if (lastComparison != 0) { return lastComparison; } @@ -1035,7 +994,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMaxProcessors()).compareTo(other.isSetMaxProcessors()); + lastComparison = java.lang.Boolean.valueOf(isSetMaxProcessors()).compareTo(other.isSetMaxProcessors()); if (lastComparison != 0) { return lastComparison; } @@ -1045,7 +1004,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMaxJobsInQueue()).compareTo(other.isSetMaxJobsInQueue()); + lastComparison = java.lang.Boolean.valueOf(isSetMaxJobsInQueue()).compareTo(other.isSetMaxJobsInQueue()); if (lastComparison != 0) { return lastComparison; } @@ -1055,7 +1014,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMaxMemory()).compareTo(other.isSetMaxMemory()); + lastComparison = java.lang.Boolean.valueOf(isSetMaxMemory()).compareTo(other.isSetMaxMemory()); if (lastComparison != 0) { return lastComparison; } @@ -1065,7 +1024,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCpuPerNode()).compareTo(other.isSetCpuPerNode()); + lastComparison = java.lang.Boolean.valueOf(isSetCpuPerNode()).compareTo(other.isSetCpuPerNode()); if (lastComparison != 0) { return lastComparison; } @@ -1075,7 +1034,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDefaultNodeCount()).compareTo(other.isSetDefaultNodeCount()); + lastComparison = java.lang.Boolean.valueOf(isSetDefaultNodeCount()).compareTo(other.isSetDefaultNodeCount()); if (lastComparison != 0) { return lastComparison; } @@ -1085,7 +1044,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDefaultCPUCount()).compareTo(other.isSetDefaultCPUCount()); + lastComparison = java.lang.Boolean.valueOf(isSetDefaultCPUCount()).compareTo(other.isSetDefaultCPUCount()); if (lastComparison != 0) { return lastComparison; } @@ -1095,7 +1054,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDefaultWalltime()).compareTo(other.isSetDefaultWalltime()); + lastComparison = java.lang.Boolean.valueOf(isSetDefaultWalltime()).compareTo(other.isSetDefaultWalltime()); if (lastComparison != 0) { return lastComparison; } @@ -1105,7 +1064,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu return lastComparison; } } - lastComparison = Boolean.valueOf(isSetQueueSpecificMacros()).compareTo(other.isSetQueueSpecificMacros()); + lastComparison = java.lang.Boolean.valueOf(isSetQueueSpecificMacros()).compareTo(other.isSetQueueSpecificMacros()); if (lastComparison != 0) { return lastComparison; } @@ -1115,7 +1074,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIsDefaultQueue()).compareTo(other.isSetIsDefaultQueue()); + lastComparison = java.lang.Boolean.valueOf(isSetIsDefaultQueue()).compareTo(other.isSetIsDefaultQueue()); if (lastComparison != 0) { return lastComparison; } @@ -1133,16 +1092,16 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).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); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("BatchQueue("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("BatchQueue("); boolean first = true; sb.append("queueName:"); @@ -1253,7 +1212,7 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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; @@ -1263,13 +1222,13 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu } } - private static class BatchQueueStandardSchemeFactory implements SchemeFactory { + private static class BatchQueueStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public BatchQueueStandardScheme getScheme() { return new BatchQueueStandardScheme(); } } - private static class BatchQueueStandardScheme extends StandardScheme<BatchQueue> { + private static class BatchQueueStandardScheme extends org.apache.thrift.scheme.StandardScheme<BatchQueue> { public void read(org.apache.thrift.protocol.TProtocol iprot, BatchQueue struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -1473,19 +1432,19 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu } - private static class BatchQueueTupleSchemeFactory implements SchemeFactory { + private static class BatchQueueTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public BatchQueueTupleScheme getScheme() { return new BatchQueueTupleScheme(); } } - private static class BatchQueueTupleScheme extends TupleScheme<BatchQueue> { + private static class BatchQueueTupleScheme extends org.apache.thrift.scheme.TupleScheme<BatchQueue> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, BatchQueue struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeString(struct.queueName); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetQueueDescription()) { optionals.set(0); } @@ -1563,10 +1522,10 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu @Override public void read(org.apache.thrift.protocol.TProtocol prot, BatchQueue struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.queueName = iprot.readString(); struct.setQueueNameIsSet(true); - BitSet incoming = iprot.readBitSet(12); + java.util.BitSet incoming = iprot.readBitSet(12); if (incoming.get(0)) { struct.queueDescription = iprot.readString(); struct.setQueueDescriptionIsSet(true); @@ -1618,5 +1577,8 @@ public class BatchQueue implements org.apache.thrift.TBase<BatchQueue, BatchQueu } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } }
http://git-wip-us.apache.org/repos/asf/airavata/blob/14ff0916/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/CloudJobSubmission.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/CloudJobSubmission.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/CloudJobSubmission.java index 7d540de..ac6b0f9 100644 --- a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/CloudJobSubmission.java +++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/appcatalog/computeresource/CloudJobSubmission.java @@ -16,47 +16,20 @@ */ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.10.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.airavata.model.appcatalog.computeresource; -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 javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) /** * Cloud Job Submission * * */ -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") [email protected](value = "Autogenerated by Thrift Compiler (0.10.0)") public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmission, CloudJobSubmission._Fields>, java.io.Serializable, Cloneable, Comparable<CloudJobSubmission> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CloudJobSubmission"); @@ -67,18 +40,15 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi private static final org.apache.thrift.protocol.TField PROVIDER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("providerName", org.apache.thrift.protocol.TType.I32, (short)5); private static final org.apache.thrift.protocol.TField USER_ACCOUNT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userAccountName", org.apache.thrift.protocol.TType.STRING, (short)6); - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new CloudJobSubmissionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new CloudJobSubmissionTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new CloudJobSubmissionStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new CloudJobSubmissionTupleSchemeFactory(); - private String jobSubmissionInterfaceId; // required + private java.lang.String jobSubmissionInterfaceId; // required private org.apache.airavata.model.data.movement.SecurityProtocol securityProtocol; // required - private String nodeId; // required - private String executableType; // required + private java.lang.String nodeId; // required + private java.lang.String executableType; // required private ProviderName providerName; // required - private String userAccountName; // required + private java.lang.String userAccountName; // 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 { @@ -97,10 +67,10 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi PROVIDER_NAME((short)5, "providerName"), USER_ACCOUNT_NAME((short)6, "userAccountName"); - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); + private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -133,21 +103,21 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.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) { + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } @@ -156,15 +126,15 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi return _thriftId; } - public String getFieldName() { + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.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); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.JOB_SUBMISSION_INTERFACE_ID, new org.apache.thrift.meta_data.FieldMetaData("jobSubmissionInterfaceId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.SECURITY_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("securityProtocol", org.apache.thrift.TFieldRequirementType.REQUIRED, @@ -177,7 +147,7 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ProviderName.class))); tmpMap.put(_Fields.USER_ACCOUNT_NAME, new org.apache.thrift.meta_data.FieldMetaData("userAccountName", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CloudJobSubmission.class, metaDataMap); } @@ -187,12 +157,12 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi } public CloudJobSubmission( - String jobSubmissionInterfaceId, + java.lang.String jobSubmissionInterfaceId, org.apache.airavata.model.data.movement.SecurityProtocol securityProtocol, - String nodeId, - String executableType, + java.lang.String nodeId, + java.lang.String executableType, ProviderName providerName, - String userAccountName) + java.lang.String userAccountName) { this(); this.jobSubmissionInterfaceId = jobSubmissionInterfaceId; @@ -242,11 +212,11 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi this.userAccountName = null; } - public String getJobSubmissionInterfaceId() { + public java.lang.String getJobSubmissionInterfaceId() { return this.jobSubmissionInterfaceId; } - public void setJobSubmissionInterfaceId(String jobSubmissionInterfaceId) { + public void setJobSubmissionInterfaceId(java.lang.String jobSubmissionInterfaceId) { this.jobSubmissionInterfaceId = jobSubmissionInterfaceId; } @@ -296,11 +266,11 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi } } - public String getNodeId() { + public java.lang.String getNodeId() { return this.nodeId; } - public void setNodeId(String nodeId) { + public void setNodeId(java.lang.String nodeId) { this.nodeId = nodeId; } @@ -319,11 +289,11 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi } } - public String getExecutableType() { + public java.lang.String getExecutableType() { return this.executableType; } - public void setExecutableType(String executableType) { + public void setExecutableType(java.lang.String executableType) { this.executableType = executableType; } @@ -373,11 +343,11 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi } } - public String getUserAccountName() { + public java.lang.String getUserAccountName() { return this.userAccountName; } - public void setUserAccountName(String userAccountName) { + public void setUserAccountName(java.lang.String userAccountName) { this.userAccountName = userAccountName; } @@ -396,13 +366,13 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi } } - public void setFieldValue(_Fields field, Object value) { + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case JOB_SUBMISSION_INTERFACE_ID: if (value == null) { unsetJobSubmissionInterfaceId(); } else { - setJobSubmissionInterfaceId((String)value); + setJobSubmissionInterfaceId((java.lang.String)value); } break; @@ -418,7 +388,7 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi if (value == null) { unsetNodeId(); } else { - setNodeId((String)value); + setNodeId((java.lang.String)value); } break; @@ -426,7 +396,7 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi if (value == null) { unsetExecutableType(); } else { - setExecutableType((String)value); + setExecutableType((java.lang.String)value); } break; @@ -442,14 +412,14 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi if (value == null) { unsetUserAccountName(); } else { - setUserAccountName((String)value); + setUserAccountName((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case JOB_SUBMISSION_INTERFACE_ID: return getJobSubmissionInterfaceId(); @@ -470,13 +440,13 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi return getUserAccountName(); } - throw new IllegalStateException(); + throw new java.lang.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(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -493,11 +463,11 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi case USER_ACCOUNT_NAME: return isSetUserAccountName(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { + public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof CloudJobSubmission) @@ -508,6 +478,8 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi public boolean equals(CloudJobSubmission that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_jobSubmissionInterfaceId = true && this.isSetJobSubmissionInterfaceId(); boolean that_present_jobSubmissionInterfaceId = true && that.isSetJobSubmissionInterfaceId(); @@ -568,39 +540,33 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi @Override public int hashCode() { - List<Object> list = new ArrayList<Object>(); + int hashCode = 1; - boolean present_jobSubmissionInterfaceId = true && (isSetJobSubmissionInterfaceId()); - list.add(present_jobSubmissionInterfaceId); - if (present_jobSubmissionInterfaceId) - list.add(jobSubmissionInterfaceId); + hashCode = hashCode * 8191 + ((isSetJobSubmissionInterfaceId()) ? 131071 : 524287); + if (isSetJobSubmissionInterfaceId()) + hashCode = hashCode * 8191 + jobSubmissionInterfaceId.hashCode(); - boolean present_securityProtocol = true && (isSetSecurityProtocol()); - list.add(present_securityProtocol); - if (present_securityProtocol) - list.add(securityProtocol.getValue()); + hashCode = hashCode * 8191 + ((isSetSecurityProtocol()) ? 131071 : 524287); + if (isSetSecurityProtocol()) + hashCode = hashCode * 8191 + securityProtocol.getValue(); - boolean present_nodeId = true && (isSetNodeId()); - list.add(present_nodeId); - if (present_nodeId) - list.add(nodeId); + hashCode = hashCode * 8191 + ((isSetNodeId()) ? 131071 : 524287); + if (isSetNodeId()) + hashCode = hashCode * 8191 + nodeId.hashCode(); - boolean present_executableType = true && (isSetExecutableType()); - list.add(present_executableType); - if (present_executableType) - list.add(executableType); + hashCode = hashCode * 8191 + ((isSetExecutableType()) ? 131071 : 524287); + if (isSetExecutableType()) + hashCode = hashCode * 8191 + executableType.hashCode(); - boolean present_providerName = true && (isSetProviderName()); - list.add(present_providerName); - if (present_providerName) - list.add(providerName.getValue()); + hashCode = hashCode * 8191 + ((isSetProviderName()) ? 131071 : 524287); + if (isSetProviderName()) + hashCode = hashCode * 8191 + providerName.getValue(); - boolean present_userAccountName = true && (isSetUserAccountName()); - list.add(present_userAccountName); - if (present_userAccountName) - list.add(userAccountName); + hashCode = hashCode * 8191 + ((isSetUserAccountName()) ? 131071 : 524287); + if (isSetUserAccountName()) + hashCode = hashCode * 8191 + userAccountName.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -611,7 +577,7 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetJobSubmissionInterfaceId()).compareTo(other.isSetJobSubmissionInterfaceId()); + lastComparison = java.lang.Boolean.valueOf(isSetJobSubmissionInterfaceId()).compareTo(other.isSetJobSubmissionInterfaceId()); if (lastComparison != 0) { return lastComparison; } @@ -621,7 +587,7 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSecurityProtocol()).compareTo(other.isSetSecurityProtocol()); + lastComparison = java.lang.Boolean.valueOf(isSetSecurityProtocol()).compareTo(other.isSetSecurityProtocol()); if (lastComparison != 0) { return lastComparison; } @@ -631,7 +597,7 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNodeId()).compareTo(other.isSetNodeId()); + lastComparison = java.lang.Boolean.valueOf(isSetNodeId()).compareTo(other.isSetNodeId()); if (lastComparison != 0) { return lastComparison; } @@ -641,7 +607,7 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExecutableType()).compareTo(other.isSetExecutableType()); + lastComparison = java.lang.Boolean.valueOf(isSetExecutableType()).compareTo(other.isSetExecutableType()); if (lastComparison != 0) { return lastComparison; } @@ -651,7 +617,7 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi return lastComparison; } } - lastComparison = Boolean.valueOf(isSetProviderName()).compareTo(other.isSetProviderName()); + lastComparison = java.lang.Boolean.valueOf(isSetProviderName()).compareTo(other.isSetProviderName()); if (lastComparison != 0) { return lastComparison; } @@ -661,7 +627,7 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi return lastComparison; } } - lastComparison = Boolean.valueOf(isSetUserAccountName()).compareTo(other.isSetUserAccountName()); + lastComparison = java.lang.Boolean.valueOf(isSetUserAccountName()).compareTo(other.isSetUserAccountName()); if (lastComparison != 0) { return lastComparison; } @@ -679,16 +645,16 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).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); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("CloudJobSubmission("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("CloudJobSubmission("); boolean first = true; sb.append("jobSubmissionInterfaceId:"); @@ -779,7 +745,7 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -787,13 +753,13 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi } } - private static class CloudJobSubmissionStandardSchemeFactory implements SchemeFactory { + private static class CloudJobSubmissionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public CloudJobSubmissionStandardScheme getScheme() { return new CloudJobSubmissionStandardScheme(); } } - private static class CloudJobSubmissionStandardScheme extends StandardScheme<CloudJobSubmission> { + private static class CloudJobSubmissionStandardScheme extends org.apache.thrift.scheme.StandardScheme<CloudJobSubmission> { public void read(org.apache.thrift.protocol.TProtocol iprot, CloudJobSubmission struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; @@ -902,17 +868,17 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi } - private static class CloudJobSubmissionTupleSchemeFactory implements SchemeFactory { + private static class CloudJobSubmissionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { public CloudJobSubmissionTupleScheme getScheme() { return new CloudJobSubmissionTupleScheme(); } } - private static class CloudJobSubmissionTupleScheme extends TupleScheme<CloudJobSubmission> { + private static class CloudJobSubmissionTupleScheme extends org.apache.thrift.scheme.TupleScheme<CloudJobSubmission> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, CloudJobSubmission struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeString(struct.jobSubmissionInterfaceId); oprot.writeI32(struct.securityProtocol.getValue()); oprot.writeString(struct.nodeId); @@ -923,7 +889,7 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi @Override public void read(org.apache.thrift.protocol.TProtocol prot, CloudJobSubmission struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.jobSubmissionInterfaceId = iprot.readString(); struct.setJobSubmissionInterfaceIdIsSet(true); struct.securityProtocol = org.apache.airavata.model.data.movement.SecurityProtocol.findByValue(iprot.readI32()); @@ -939,5 +905,8 @@ public class CloudJobSubmission implements org.apache.thrift.TBase<CloudJobSubmi } } + private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } }
