| /** |
| * Licensed to the Apache Software Foundation (ASF) under one or more |
| * contributor license agreements. See the NOTICE file distributed with |
| * this work for additional information regarding copyright ownership. |
| * The ASF licenses this file to You under the Apache License, Version 2.0 |
| * (the "License"); you may not use this file except in compliance with |
| * the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| /** |
| * 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; |
| |
| @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) |
| /** |
| * Batch Queue Information on SuperComputers |
| * |
| * maxRunTime: |
| * Maximum allowed run time in hours. |
| */ |
| @javax.annotation.Generated(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"); |
| |
| private static final org.apache.thrift.protocol.TField QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("queueName", org.apache.thrift.protocol.TType.STRING, (short)1); |
| private static final org.apache.thrift.protocol.TField QUEUE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("queueDescription", org.apache.thrift.protocol.TType.STRING, (short)2); |
| private static final org.apache.thrift.protocol.TField MAX_RUN_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("maxRunTime", org.apache.thrift.protocol.TType.I32, (short)3); |
| private static final org.apache.thrift.protocol.TField MAX_NODES_FIELD_DESC = new org.apache.thrift.protocol.TField("maxNodes", org.apache.thrift.protocol.TType.I32, (short)4); |
| private static final org.apache.thrift.protocol.TField MAX_PROCESSORS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxProcessors", org.apache.thrift.protocol.TType.I32, (short)5); |
| private static final org.apache.thrift.protocol.TField MAX_JOBS_IN_QUEUE_FIELD_DESC = new org.apache.thrift.protocol.TField("maxJobsInQueue", org.apache.thrift.protocol.TType.I32, (short)6); |
| private static final org.apache.thrift.protocol.TField MAX_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("maxMemory", org.apache.thrift.protocol.TType.I32, (short)7); |
| private static final org.apache.thrift.protocol.TField CPU_PER_NODE_FIELD_DESC = new org.apache.thrift.protocol.TField("cpuPerNode", org.apache.thrift.protocol.TType.I32, (short)8); |
| private static final org.apache.thrift.protocol.TField DEFAULT_NODE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultNodeCount", org.apache.thrift.protocol.TType.I32, (short)9); |
| private static final org.apache.thrift.protocol.TField DEFAULT_CPUCOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultCPUCount", org.apache.thrift.protocol.TType.I32, (short)10); |
| private static final org.apache.thrift.protocol.TField DEFAULT_WALLTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("defaultWalltime", org.apache.thrift.protocol.TType.I32, (short)11); |
| 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 org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new BatchQueueStandardSchemeFactory(); |
| private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new BatchQueueTupleSchemeFactory(); |
| |
| private java.lang.String queueName; // required |
| private java.lang.String queueDescription; // optional |
| private int maxRunTime; // optional |
| private int maxNodes; // optional |
| private int maxProcessors; // optional |
| private int maxJobsInQueue; // optional |
| private int maxMemory; // optional |
| private int cpuPerNode; // optional |
| private int defaultNodeCount; // optional |
| private int defaultCPUCount; // optional |
| private int defaultWalltime; // 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. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| QUEUE_NAME((short)1, "queueName"), |
| QUEUE_DESCRIPTION((short)2, "queueDescription"), |
| MAX_RUN_TIME((short)3, "maxRunTime"), |
| MAX_NODES((short)4, "maxNodes"), |
| MAX_PROCESSORS((short)5, "maxProcessors"), |
| MAX_JOBS_IN_QUEUE((short)6, "maxJobsInQueue"), |
| MAX_MEMORY((short)7, "maxMemory"), |
| CPU_PER_NODE((short)8, "cpuPerNode"), |
| DEFAULT_NODE_COUNT((short)9, "defaultNodeCount"), |
| DEFAULT_CPUCOUNT((short)10, "defaultCPUCount"), |
| DEFAULT_WALLTIME((short)11, "defaultWalltime"), |
| QUEUE_SPECIFIC_MACROS((short)12, "queueSpecificMacros"), |
| IS_DEFAULT_QUEUE((short)13, "isDefaultQueue"); |
| |
| private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); |
| |
| static { |
| for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // QUEUE_NAME |
| return QUEUE_NAME; |
| case 2: // QUEUE_DESCRIPTION |
| return QUEUE_DESCRIPTION; |
| case 3: // MAX_RUN_TIME |
| return MAX_RUN_TIME; |
| case 4: // MAX_NODES |
| return MAX_NODES; |
| case 5: // MAX_PROCESSORS |
| return MAX_PROCESSORS; |
| case 6: // MAX_JOBS_IN_QUEUE |
| return MAX_JOBS_IN_QUEUE; |
| case 7: // MAX_MEMORY |
| return MAX_MEMORY; |
| case 8: // CPU_PER_NODE |
| return CPU_PER_NODE; |
| case 9: // DEFAULT_NODE_COUNT |
| return DEFAULT_NODE_COUNT; |
| case 10: // DEFAULT_CPUCOUNT |
| return DEFAULT_CPUCOUNT; |
| case 11: // DEFAULT_WALLTIME |
| return DEFAULT_WALLTIME; |
| case 12: // QUEUE_SPECIFIC_MACROS |
| return QUEUE_SPECIFIC_MACROS; |
| case 13: // IS_DEFAULT_QUEUE |
| return IS_DEFAULT_QUEUE; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| 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(java.lang.String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final java.lang.String _fieldName; |
| |
| _Fields(short thriftId, java.lang.String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public java.lang.String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| private static final int __MAXRUNTIME_ISSET_ID = 0; |
| private static final int __MAXNODES_ISSET_ID = 1; |
| private static final int __MAXPROCESSORS_ISSET_ID = 2; |
| private static final int __MAXJOBSINQUEUE_ISSET_ID = 3; |
| private static final int __MAXMEMORY_ISSET_ID = 4; |
| private static final int __CPUPERNODE_ISSET_ID = 5; |
| private static final int __DEFAULTNODECOUNT_ISSET_ID = 6; |
| private static final int __DEFAULTCPUCOUNT_ISSET_ID = 7; |
| private static final int __DEFAULTWALLTIME_ISSET_ID = 8; |
| 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 java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| 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, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.MAX_RUN_TIME, new org.apache.thrift.meta_data.FieldMetaData("maxRunTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); |
| tmpMap.put(_Fields.MAX_NODES, new org.apache.thrift.meta_data.FieldMetaData("maxNodes", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); |
| tmpMap.put(_Fields.MAX_PROCESSORS, new org.apache.thrift.meta_data.FieldMetaData("maxProcessors", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); |
| tmpMap.put(_Fields.MAX_JOBS_IN_QUEUE, new org.apache.thrift.meta_data.FieldMetaData("maxJobsInQueue", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); |
| tmpMap.put(_Fields.MAX_MEMORY, new org.apache.thrift.meta_data.FieldMetaData("maxMemory", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); |
| tmpMap.put(_Fields.CPU_PER_NODE, new org.apache.thrift.meta_data.FieldMetaData("cpuPerNode", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); |
| tmpMap.put(_Fields.DEFAULT_NODE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("defaultNodeCount", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); |
| tmpMap.put(_Fields.DEFAULT_CPUCOUNT, new org.apache.thrift.meta_data.FieldMetaData("defaultCPUCount", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); |
| tmpMap.put(_Fields.DEFAULT_WALLTIME, new org.apache.thrift.meta_data.FieldMetaData("defaultWalltime", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); |
| tmpMap.put(_Fields.QUEUE_SPECIFIC_MACROS, new org.apache.thrift.meta_data.FieldMetaData("queueSpecificMacros", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| 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 = java.util.Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BatchQueue.class, metaDataMap); |
| } |
| |
| public BatchQueue() { |
| } |
| |
| public BatchQueue( |
| java.lang.String queueName) |
| { |
| this(); |
| this.queueName = queueName; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public BatchQueue(BatchQueue other) { |
| __isset_bitfield = other.__isset_bitfield; |
| if (other.isSetQueueName()) { |
| this.queueName = other.queueName; |
| } |
| if (other.isSetQueueDescription()) { |
| this.queueDescription = other.queueDescription; |
| } |
| this.maxRunTime = other.maxRunTime; |
| this.maxNodes = other.maxNodes; |
| this.maxProcessors = other.maxProcessors; |
| this.maxJobsInQueue = other.maxJobsInQueue; |
| this.maxMemory = other.maxMemory; |
| this.cpuPerNode = other.cpuPerNode; |
| this.defaultNodeCount = other.defaultNodeCount; |
| this.defaultCPUCount = other.defaultCPUCount; |
| this.defaultWalltime = other.defaultWalltime; |
| if (other.isSetQueueSpecificMacros()) { |
| this.queueSpecificMacros = other.queueSpecificMacros; |
| } |
| this.isDefaultQueue = other.isDefaultQueue; |
| } |
| |
| public BatchQueue deepCopy() { |
| return new BatchQueue(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.queueName = null; |
| this.queueDescription = null; |
| setMaxRunTimeIsSet(false); |
| this.maxRunTime = 0; |
| setMaxNodesIsSet(false); |
| this.maxNodes = 0; |
| setMaxProcessorsIsSet(false); |
| this.maxProcessors = 0; |
| setMaxJobsInQueueIsSet(false); |
| this.maxJobsInQueue = 0; |
| setMaxMemoryIsSet(false); |
| this.maxMemory = 0; |
| setCpuPerNodeIsSet(false); |
| this.cpuPerNode = 0; |
| setDefaultNodeCountIsSet(false); |
| this.defaultNodeCount = 0; |
| setDefaultCPUCountIsSet(false); |
| this.defaultCPUCount = 0; |
| setDefaultWalltimeIsSet(false); |
| this.defaultWalltime = 0; |
| this.queueSpecificMacros = null; |
| setIsDefaultQueueIsSet(false); |
| this.isDefaultQueue = false; |
| } |
| |
| public java.lang.String getQueueName() { |
| return this.queueName; |
| } |
| |
| public void setQueueName(java.lang.String queueName) { |
| this.queueName = queueName; |
| } |
| |
| public void unsetQueueName() { |
| this.queueName = null; |
| } |
| |
| /** Returns true if field queueName is set (has been assigned a value) and false otherwise */ |
| public boolean isSetQueueName() { |
| return this.queueName != null; |
| } |
| |
| public void setQueueNameIsSet(boolean value) { |
| if (!value) { |
| this.queueName = null; |
| } |
| } |
| |
| public java.lang.String getQueueDescription() { |
| return this.queueDescription; |
| } |
| |
| public void setQueueDescription(java.lang.String queueDescription) { |
| this.queueDescription = queueDescription; |
| } |
| |
| public void unsetQueueDescription() { |
| this.queueDescription = null; |
| } |
| |
| /** Returns true if field queueDescription is set (has been assigned a value) and false otherwise */ |
| public boolean isSetQueueDescription() { |
| return this.queueDescription != null; |
| } |
| |
| public void setQueueDescriptionIsSet(boolean value) { |
| if (!value) { |
| this.queueDescription = null; |
| } |
| } |
| |
| public int getMaxRunTime() { |
| return this.maxRunTime; |
| } |
| |
| public void setMaxRunTime(int maxRunTime) { |
| this.maxRunTime = maxRunTime; |
| setMaxRunTimeIsSet(true); |
| } |
| |
| public void unsetMaxRunTime() { |
| __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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXRUNTIME_ISSET_ID); |
| } |
| |
| public void setMaxRunTimeIsSet(boolean value) { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXRUNTIME_ISSET_ID, value); |
| } |
| |
| public int getMaxNodes() { |
| return this.maxNodes; |
| } |
| |
| public void setMaxNodes(int maxNodes) { |
| this.maxNodes = maxNodes; |
| setMaxNodesIsSet(true); |
| } |
| |
| public void unsetMaxNodes() { |
| __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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXNODES_ISSET_ID); |
| } |
| |
| public void setMaxNodesIsSet(boolean value) { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXNODES_ISSET_ID, value); |
| } |
| |
| public int getMaxProcessors() { |
| return this.maxProcessors; |
| } |
| |
| public void setMaxProcessors(int maxProcessors) { |
| this.maxProcessors = maxProcessors; |
| setMaxProcessorsIsSet(true); |
| } |
| |
| public void unsetMaxProcessors() { |
| __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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXPROCESSORS_ISSET_ID); |
| } |
| |
| public void setMaxProcessorsIsSet(boolean value) { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXPROCESSORS_ISSET_ID, value); |
| } |
| |
| public int getMaxJobsInQueue() { |
| return this.maxJobsInQueue; |
| } |
| |
| public void setMaxJobsInQueue(int maxJobsInQueue) { |
| this.maxJobsInQueue = maxJobsInQueue; |
| setMaxJobsInQueueIsSet(true); |
| } |
| |
| public void unsetMaxJobsInQueue() { |
| __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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXJOBSINQUEUE_ISSET_ID); |
| } |
| |
| public void setMaxJobsInQueueIsSet(boolean value) { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXJOBSINQUEUE_ISSET_ID, value); |
| } |
| |
| public int getMaxMemory() { |
| return this.maxMemory; |
| } |
| |
| public void setMaxMemory(int maxMemory) { |
| this.maxMemory = maxMemory; |
| setMaxMemoryIsSet(true); |
| } |
| |
| public void unsetMaxMemory() { |
| __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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXMEMORY_ISSET_ID); |
| } |
| |
| public void setMaxMemoryIsSet(boolean value) { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXMEMORY_ISSET_ID, value); |
| } |
| |
| public int getCpuPerNode() { |
| return this.cpuPerNode; |
| } |
| |
| public void setCpuPerNode(int cpuPerNode) { |
| this.cpuPerNode = cpuPerNode; |
| setCpuPerNodeIsSet(true); |
| } |
| |
| public void unsetCpuPerNode() { |
| __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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CPUPERNODE_ISSET_ID); |
| } |
| |
| public void setCpuPerNodeIsSet(boolean value) { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CPUPERNODE_ISSET_ID, value); |
| } |
| |
| public int getDefaultNodeCount() { |
| return this.defaultNodeCount; |
| } |
| |
| public void setDefaultNodeCount(int defaultNodeCount) { |
| this.defaultNodeCount = defaultNodeCount; |
| setDefaultNodeCountIsSet(true); |
| } |
| |
| public void unsetDefaultNodeCount() { |
| __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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DEFAULTNODECOUNT_ISSET_ID); |
| } |
| |
| public void setDefaultNodeCountIsSet(boolean value) { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DEFAULTNODECOUNT_ISSET_ID, value); |
| } |
| |
| public int getDefaultCPUCount() { |
| return this.defaultCPUCount; |
| } |
| |
| public void setDefaultCPUCount(int defaultCPUCount) { |
| this.defaultCPUCount = defaultCPUCount; |
| setDefaultCPUCountIsSet(true); |
| } |
| |
| public void unsetDefaultCPUCount() { |
| __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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DEFAULTCPUCOUNT_ISSET_ID); |
| } |
| |
| public void setDefaultCPUCountIsSet(boolean value) { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DEFAULTCPUCOUNT_ISSET_ID, value); |
| } |
| |
| public int getDefaultWalltime() { |
| return this.defaultWalltime; |
| } |
| |
| public void setDefaultWalltime(int defaultWalltime) { |
| this.defaultWalltime = defaultWalltime; |
| setDefaultWalltimeIsSet(true); |
| } |
| |
| public void unsetDefaultWalltime() { |
| __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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DEFAULTWALLTIME_ISSET_ID); |
| } |
| |
| public void setDefaultWalltimeIsSet(boolean value) { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DEFAULTWALLTIME_ISSET_ID, value); |
| } |
| |
| public java.lang.String getQueueSpecificMacros() { |
| return this.queueSpecificMacros; |
| } |
| |
| public void setQueueSpecificMacros(java.lang.String queueSpecificMacros) { |
| this.queueSpecificMacros = queueSpecificMacros; |
| } |
| |
| public void unsetQueueSpecificMacros() { |
| this.queueSpecificMacros = null; |
| } |
| |
| /** Returns true if field queueSpecificMacros is set (has been assigned a value) and false otherwise */ |
| public boolean isSetQueueSpecificMacros() { |
| return this.queueSpecificMacros != null; |
| } |
| |
| public void setQueueSpecificMacrosIsSet(boolean value) { |
| if (!value) { |
| this.queueSpecificMacros = null; |
| } |
| } |
| |
| public boolean isIsDefaultQueue() { |
| return this.isDefaultQueue; |
| } |
| |
| public void setIsDefaultQueue(boolean isDefaultQueue) { |
| this.isDefaultQueue = isDefaultQueue; |
| setIsDefaultQueueIsSet(true); |
| } |
| |
| public void unsetIsDefaultQueue() { |
| __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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISDEFAULTQUEUE_ISSET_ID); |
| } |
| |
| public void setIsDefaultQueueIsSet(boolean value) { |
| __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISDEFAULTQUEUE_ISSET_ID, value); |
| } |
| |
| public void setFieldValue(_Fields field, java.lang.Object value) { |
| switch (field) { |
| case QUEUE_NAME: |
| if (value == null) { |
| unsetQueueName(); |
| } else { |
| setQueueName((java.lang.String)value); |
| } |
| break; |
| |
| case QUEUE_DESCRIPTION: |
| if (value == null) { |
| unsetQueueDescription(); |
| } else { |
| setQueueDescription((java.lang.String)value); |
| } |
| break; |
| |
| case MAX_RUN_TIME: |
| if (value == null) { |
| unsetMaxRunTime(); |
| } else { |
| setMaxRunTime((java.lang.Integer)value); |
| } |
| break; |
| |
| case MAX_NODES: |
| if (value == null) { |
| unsetMaxNodes(); |
| } else { |
| setMaxNodes((java.lang.Integer)value); |
| } |
| break; |
| |
| case MAX_PROCESSORS: |
| if (value == null) { |
| unsetMaxProcessors(); |
| } else { |
| setMaxProcessors((java.lang.Integer)value); |
| } |
| break; |
| |
| case MAX_JOBS_IN_QUEUE: |
| if (value == null) { |
| unsetMaxJobsInQueue(); |
| } else { |
| setMaxJobsInQueue((java.lang.Integer)value); |
| } |
| break; |
| |
| case MAX_MEMORY: |
| if (value == null) { |
| unsetMaxMemory(); |
| } else { |
| setMaxMemory((java.lang.Integer)value); |
| } |
| break; |
| |
| case CPU_PER_NODE: |
| if (value == null) { |
| unsetCpuPerNode(); |
| } else { |
| setCpuPerNode((java.lang.Integer)value); |
| } |
| break; |
| |
| case DEFAULT_NODE_COUNT: |
| if (value == null) { |
| unsetDefaultNodeCount(); |
| } else { |
| setDefaultNodeCount((java.lang.Integer)value); |
| } |
| break; |
| |
| case DEFAULT_CPUCOUNT: |
| if (value == null) { |
| unsetDefaultCPUCount(); |
| } else { |
| setDefaultCPUCount((java.lang.Integer)value); |
| } |
| break; |
| |
| case DEFAULT_WALLTIME: |
| if (value == null) { |
| unsetDefaultWalltime(); |
| } else { |
| setDefaultWalltime((java.lang.Integer)value); |
| } |
| break; |
| |
| case QUEUE_SPECIFIC_MACROS: |
| if (value == null) { |
| unsetQueueSpecificMacros(); |
| } else { |
| setQueueSpecificMacros((java.lang.String)value); |
| } |
| break; |
| |
| case IS_DEFAULT_QUEUE: |
| if (value == null) { |
| unsetIsDefaultQueue(); |
| } else { |
| setIsDefaultQueue((java.lang.Boolean)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public java.lang.Object getFieldValue(_Fields field) { |
| switch (field) { |
| case QUEUE_NAME: |
| return getQueueName(); |
| |
| case QUEUE_DESCRIPTION: |
| return getQueueDescription(); |
| |
| case MAX_RUN_TIME: |
| return getMaxRunTime(); |
| |
| case MAX_NODES: |
| return getMaxNodes(); |
| |
| case MAX_PROCESSORS: |
| return getMaxProcessors(); |
| |
| case MAX_JOBS_IN_QUEUE: |
| return getMaxJobsInQueue(); |
| |
| case MAX_MEMORY: |
| return getMaxMemory(); |
| |
| case CPU_PER_NODE: |
| return getCpuPerNode(); |
| |
| case DEFAULT_NODE_COUNT: |
| return getDefaultNodeCount(); |
| |
| case DEFAULT_CPUCOUNT: |
| return getDefaultCPUCount(); |
| |
| case DEFAULT_WALLTIME: |
| return getDefaultWalltime(); |
| |
| case QUEUE_SPECIFIC_MACROS: |
| return getQueueSpecificMacros(); |
| |
| case IS_DEFAULT_QUEUE: |
| return isIsDefaultQueue(); |
| |
| } |
| 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 java.lang.IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case QUEUE_NAME: |
| return isSetQueueName(); |
| case QUEUE_DESCRIPTION: |
| return isSetQueueDescription(); |
| case MAX_RUN_TIME: |
| return isSetMaxRunTime(); |
| case MAX_NODES: |
| return isSetMaxNodes(); |
| case MAX_PROCESSORS: |
| return isSetMaxProcessors(); |
| case MAX_JOBS_IN_QUEUE: |
| return isSetMaxJobsInQueue(); |
| case MAX_MEMORY: |
| return isSetMaxMemory(); |
| case CPU_PER_NODE: |
| return isSetCpuPerNode(); |
| case DEFAULT_NODE_COUNT: |
| return isSetDefaultNodeCount(); |
| case DEFAULT_CPUCOUNT: |
| return isSetDefaultCPUCount(); |
| case DEFAULT_WALLTIME: |
| return isSetDefaultWalltime(); |
| case QUEUE_SPECIFIC_MACROS: |
| return isSetQueueSpecificMacros(); |
| case IS_DEFAULT_QUEUE: |
| return isSetIsDefaultQueue(); |
| } |
| throw new java.lang.IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(java.lang.Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof BatchQueue) |
| return this.equals((BatchQueue)that); |
| return false; |
| } |
| |
| 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(); |
| if (this_present_queueName || that_present_queueName) { |
| if (!(this_present_queueName && that_present_queueName)) |
| return false; |
| if (!this.queueName.equals(that.queueName)) |
| return false; |
| } |
| |
| boolean this_present_queueDescription = true && this.isSetQueueDescription(); |
| boolean that_present_queueDescription = true && that.isSetQueueDescription(); |
| if (this_present_queueDescription || that_present_queueDescription) { |
| if (!(this_present_queueDescription && that_present_queueDescription)) |
| return false; |
| if (!this.queueDescription.equals(that.queueDescription)) |
| return false; |
| } |
| |
| boolean this_present_maxRunTime = true && this.isSetMaxRunTime(); |
| boolean that_present_maxRunTime = true && that.isSetMaxRunTime(); |
| if (this_present_maxRunTime || that_present_maxRunTime) { |
| if (!(this_present_maxRunTime && that_present_maxRunTime)) |
| return false; |
| if (this.maxRunTime != that.maxRunTime) |
| return false; |
| } |
| |
| boolean this_present_maxNodes = true && this.isSetMaxNodes(); |
| boolean that_present_maxNodes = true && that.isSetMaxNodes(); |
| if (this_present_maxNodes || that_present_maxNodes) { |
| if (!(this_present_maxNodes && that_present_maxNodes)) |
| return false; |
| if (this.maxNodes != that.maxNodes) |
| return false; |
| } |
| |
| boolean this_present_maxProcessors = true && this.isSetMaxProcessors(); |
| boolean that_present_maxProcessors = true && that.isSetMaxProcessors(); |
| if (this_present_maxProcessors || that_present_maxProcessors) { |
| if (!(this_present_maxProcessors && that_present_maxProcessors)) |
| return false; |
| if (this.maxProcessors != that.maxProcessors) |
| return false; |
| } |
| |
| boolean this_present_maxJobsInQueue = true && this.isSetMaxJobsInQueue(); |
| boolean that_present_maxJobsInQueue = true && that.isSetMaxJobsInQueue(); |
| if (this_present_maxJobsInQueue || that_present_maxJobsInQueue) { |
| if (!(this_present_maxJobsInQueue && that_present_maxJobsInQueue)) |
| return false; |
| if (this.maxJobsInQueue != that.maxJobsInQueue) |
| return false; |
| } |
| |
| boolean this_present_maxMemory = true && this.isSetMaxMemory(); |
| boolean that_present_maxMemory = true && that.isSetMaxMemory(); |
| if (this_present_maxMemory || that_present_maxMemory) { |
| if (!(this_present_maxMemory && that_present_maxMemory)) |
| return false; |
| if (this.maxMemory != that.maxMemory) |
| return false; |
| } |
| |
| boolean this_present_cpuPerNode = true && this.isSetCpuPerNode(); |
| boolean that_present_cpuPerNode = true && that.isSetCpuPerNode(); |
| if (this_present_cpuPerNode || that_present_cpuPerNode) { |
| if (!(this_present_cpuPerNode && that_present_cpuPerNode)) |
| return false; |
| if (this.cpuPerNode != that.cpuPerNode) |
| return false; |
| } |
| |
| boolean this_present_defaultNodeCount = true && this.isSetDefaultNodeCount(); |
| boolean that_present_defaultNodeCount = true && that.isSetDefaultNodeCount(); |
| if (this_present_defaultNodeCount || that_present_defaultNodeCount) { |
| if (!(this_present_defaultNodeCount && that_present_defaultNodeCount)) |
| return false; |
| if (this.defaultNodeCount != that.defaultNodeCount) |
| return false; |
| } |
| |
| boolean this_present_defaultCPUCount = true && this.isSetDefaultCPUCount(); |
| boolean that_present_defaultCPUCount = true && that.isSetDefaultCPUCount(); |
| if (this_present_defaultCPUCount || that_present_defaultCPUCount) { |
| if (!(this_present_defaultCPUCount && that_present_defaultCPUCount)) |
| return false; |
| if (this.defaultCPUCount != that.defaultCPUCount) |
| return false; |
| } |
| |
| boolean this_present_defaultWalltime = true && this.isSetDefaultWalltime(); |
| boolean that_present_defaultWalltime = true && that.isSetDefaultWalltime(); |
| if (this_present_defaultWalltime || that_present_defaultWalltime) { |
| if (!(this_present_defaultWalltime && that_present_defaultWalltime)) |
| return false; |
| if (this.defaultWalltime != that.defaultWalltime) |
| return false; |
| } |
| |
| boolean this_present_queueSpecificMacros = true && this.isSetQueueSpecificMacros(); |
| boolean that_present_queueSpecificMacros = true && that.isSetQueueSpecificMacros(); |
| if (this_present_queueSpecificMacros || that_present_queueSpecificMacros) { |
| if (!(this_present_queueSpecificMacros && that_present_queueSpecificMacros)) |
| return false; |
| if (!this.queueSpecificMacros.equals(that.queueSpecificMacros)) |
| return false; |
| } |
| |
| boolean this_present_isDefaultQueue = true && this.isSetIsDefaultQueue(); |
| boolean that_present_isDefaultQueue = true && that.isSetIsDefaultQueue(); |
| if (this_present_isDefaultQueue || that_present_isDefaultQueue) { |
| if (!(this_present_isDefaultQueue && that_present_isDefaultQueue)) |
| return false; |
| if (this.isDefaultQueue != that.isDefaultQueue) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int 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 |
| public int compareTo(BatchQueue other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = java.lang.Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetQueueName()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queueName, other.queueName); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetQueueDescription()).compareTo(other.isSetQueueDescription()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetQueueDescription()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queueDescription, other.queueDescription); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetMaxRunTime()).compareTo(other.isSetMaxRunTime()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetMaxRunTime()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxRunTime, other.maxRunTime); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetMaxNodes()).compareTo(other.isSetMaxNodes()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetMaxNodes()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxNodes, other.maxNodes); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetMaxProcessors()).compareTo(other.isSetMaxProcessors()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetMaxProcessors()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxProcessors, other.maxProcessors); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetMaxJobsInQueue()).compareTo(other.isSetMaxJobsInQueue()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetMaxJobsInQueue()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxJobsInQueue, other.maxJobsInQueue); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetMaxMemory()).compareTo(other.isSetMaxMemory()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetMaxMemory()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxMemory, other.maxMemory); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetCpuPerNode()).compareTo(other.isSetCpuPerNode()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetCpuPerNode()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cpuPerNode, other.cpuPerNode); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetDefaultNodeCount()).compareTo(other.isSetDefaultNodeCount()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetDefaultNodeCount()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultNodeCount, other.defaultNodeCount); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetDefaultCPUCount()).compareTo(other.isSetDefaultCPUCount()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetDefaultCPUCount()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultCPUCount, other.defaultCPUCount); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetDefaultWalltime()).compareTo(other.isSetDefaultWalltime()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetDefaultWalltime()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.defaultWalltime, other.defaultWalltime); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetQueueSpecificMacros()).compareTo(other.isSetQueueSpecificMacros()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetQueueSpecificMacros()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queueSpecificMacros, other.queueSpecificMacros); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetIsDefaultQueue()).compareTo(other.isSetIsDefaultQueue()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetIsDefaultQueue()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDefaultQueue, other.isDefaultQueue); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| scheme(iprot).read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| scheme(oprot).write(oprot, this); |
| } |
| |
| @Override |
| public java.lang.String toString() { |
| java.lang.StringBuilder sb = new java.lang.StringBuilder("BatchQueue("); |
| boolean first = true; |
| |
| sb.append("queueName:"); |
| if (this.queueName == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.queueName); |
| } |
| first = false; |
| if (isSetQueueDescription()) { |
| if (!first) sb.append(", "); |
| sb.append("queueDescription:"); |
| if (this.queueDescription == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.queueDescription); |
| } |
| first = false; |
| } |
| if (isSetMaxRunTime()) { |
| if (!first) sb.append(", "); |
| sb.append("maxRunTime:"); |
| sb.append(this.maxRunTime); |
| first = false; |
| } |
| if (isSetMaxNodes()) { |
| if (!first) sb.append(", "); |
| sb.append("maxNodes:"); |
| sb.append(this.maxNodes); |
| first = false; |
| } |
| if (isSetMaxProcessors()) { |
| if (!first) sb.append(", "); |
| sb.append("maxProcessors:"); |
| sb.append(this.maxProcessors); |
| first = false; |
| } |
| if (isSetMaxJobsInQueue()) { |
| if (!first) sb.append(", "); |
| sb.append("maxJobsInQueue:"); |
| sb.append(this.maxJobsInQueue); |
| first = false; |
| } |
| if (isSetMaxMemory()) { |
| if (!first) sb.append(", "); |
| sb.append("maxMemory:"); |
| sb.append(this.maxMemory); |
| first = false; |
| } |
| if (isSetCpuPerNode()) { |
| if (!first) sb.append(", "); |
| sb.append("cpuPerNode:"); |
| sb.append(this.cpuPerNode); |
| first = false; |
| } |
| if (isSetDefaultNodeCount()) { |
| if (!first) sb.append(", "); |
| sb.append("defaultNodeCount:"); |
| sb.append(this.defaultNodeCount); |
| first = false; |
| } |
| if (isSetDefaultCPUCount()) { |
| if (!first) sb.append(", "); |
| sb.append("defaultCPUCount:"); |
| sb.append(this.defaultCPUCount); |
| first = false; |
| } |
| if (isSetDefaultWalltime()) { |
| if (!first) sb.append(", "); |
| sb.append("defaultWalltime:"); |
| sb.append(this.defaultWalltime); |
| first = false; |
| } |
| if (isSetQueueSpecificMacros()) { |
| if (!first) sb.append(", "); |
| sb.append("queueSpecificMacros:"); |
| if (this.queueSpecificMacros == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.queueSpecificMacros); |
| } |
| first = false; |
| } |
| if (isSetIsDefaultQueue()) { |
| if (!first) sb.append(", "); |
| sb.append("isDefaultQueue:"); |
| sb.append(this.isDefaultQueue); |
| first = false; |
| } |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| if (!isSetQueueName()) { |
| throw new org.apache.thrift.protocol.TProtocolException("Required field 'queueName' is unset! Struct:" + toString()); |
| } |
| |
| // check for sub-struct validity |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| 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; |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class BatchQueueStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| public BatchQueueStandardScheme getScheme() { |
| return new BatchQueueStandardScheme(); |
| } |
| } |
| |
| 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; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // QUEUE_NAME |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.queueName = iprot.readString(); |
| struct.setQueueNameIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 2: // QUEUE_DESCRIPTION |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.queueDescription = iprot.readString(); |
| struct.setQueueDescriptionIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 3: // MAX_RUN_TIME |
| if (schemeField.type == org.apache.thrift.protocol.TType.I32) { |
| struct.maxRunTime = iprot.readI32(); |
| struct.setMaxRunTimeIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 4: // MAX_NODES |
| if (schemeField.type == org.apache.thrift.protocol.TType.I32) { |
| struct.maxNodes = iprot.readI32(); |
| struct.setMaxNodesIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 5: // MAX_PROCESSORS |
| if (schemeField.type == org.apache.thrift.protocol.TType.I32) { |
| struct.maxProcessors = iprot.readI32(); |
| struct.setMaxProcessorsIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 6: // MAX_JOBS_IN_QUEUE |
| if (schemeField.type == org.apache.thrift.protocol.TType.I32) { |
| struct.maxJobsInQueue = iprot.readI32(); |
| struct.setMaxJobsInQueueIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 7: // MAX_MEMORY |
| if (schemeField.type == org.apache.thrift.protocol.TType.I32) { |
| struct.maxMemory = iprot.readI32(); |
| struct.setMaxMemoryIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 8: // CPU_PER_NODE |
| if (schemeField.type == org.apache.thrift.protocol.TType.I32) { |
| struct.cpuPerNode = iprot.readI32(); |
| struct.setCpuPerNodeIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 9: // DEFAULT_NODE_COUNT |
| if (schemeField.type == org.apache.thrift.protocol.TType.I32) { |
| struct.defaultNodeCount = iprot.readI32(); |
| struct.setDefaultNodeCountIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 10: // DEFAULT_CPUCOUNT |
| if (schemeField.type == org.apache.thrift.protocol.TType.I32) { |
| struct.defaultCPUCount = iprot.readI32(); |
| struct.setDefaultCPUCountIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 11: // DEFAULT_WALLTIME |
| if (schemeField.type == org.apache.thrift.protocol.TType.I32) { |
| struct.defaultWalltime = iprot.readI32(); |
| struct.setDefaultWalltimeIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 12: // QUEUE_SPECIFIC_MACROS |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.queueSpecificMacros = iprot.readString(); |
| struct.setQueueSpecificMacrosIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 13: // IS_DEFAULT_QUEUE |
| if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { |
| struct.isDefaultQueue = iprot.readBool(); |
| struct.setIsDefaultQueueIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, BatchQueue struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.queueName != null) { |
| oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC); |
| oprot.writeString(struct.queueName); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.queueDescription != null) { |
| if (struct.isSetQueueDescription()) { |
| oprot.writeFieldBegin(QUEUE_DESCRIPTION_FIELD_DESC); |
| oprot.writeString(struct.queueDescription); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.isSetMaxRunTime()) { |
| oprot.writeFieldBegin(MAX_RUN_TIME_FIELD_DESC); |
| oprot.writeI32(struct.maxRunTime); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.isSetMaxNodes()) { |
| oprot.writeFieldBegin(MAX_NODES_FIELD_DESC); |
| oprot.writeI32(struct.maxNodes); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.isSetMaxProcessors()) { |
| oprot.writeFieldBegin(MAX_PROCESSORS_FIELD_DESC); |
| oprot.writeI32(struct.maxProcessors); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.isSetMaxJobsInQueue()) { |
| oprot.writeFieldBegin(MAX_JOBS_IN_QUEUE_FIELD_DESC); |
| oprot.writeI32(struct.maxJobsInQueue); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.isSetMaxMemory()) { |
| oprot.writeFieldBegin(MAX_MEMORY_FIELD_DESC); |
| oprot.writeI32(struct.maxMemory); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.isSetCpuPerNode()) { |
| oprot.writeFieldBegin(CPU_PER_NODE_FIELD_DESC); |
| oprot.writeI32(struct.cpuPerNode); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.isSetDefaultNodeCount()) { |
| oprot.writeFieldBegin(DEFAULT_NODE_COUNT_FIELD_DESC); |
| oprot.writeI32(struct.defaultNodeCount); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.isSetDefaultCPUCount()) { |
| oprot.writeFieldBegin(DEFAULT_CPUCOUNT_FIELD_DESC); |
| oprot.writeI32(struct.defaultCPUCount); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.isSetDefaultWalltime()) { |
| oprot.writeFieldBegin(DEFAULT_WALLTIME_FIELD_DESC); |
| oprot.writeI32(struct.defaultWalltime); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.queueSpecificMacros != null) { |
| if (struct.isSetQueueSpecificMacros()) { |
| oprot.writeFieldBegin(QUEUE_SPECIFIC_MACROS_FIELD_DESC); |
| oprot.writeString(struct.queueSpecificMacros); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.isSetIsDefaultQueue()) { |
| oprot.writeFieldBegin(IS_DEFAULT_QUEUE_FIELD_DESC); |
| oprot.writeBool(struct.isDefaultQueue); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class BatchQueueTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| public BatchQueueTupleScheme getScheme() { |
| return new BatchQueueTupleScheme(); |
| } |
| } |
| |
| 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 { |
| org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| oprot.writeString(struct.queueName); |
| java.util.BitSet optionals = new java.util.BitSet(); |
| if (struct.isSetQueueDescription()) { |
| optionals.set(0); |
| } |
| if (struct.isSetMaxRunTime()) { |
| optionals.set(1); |
| } |
| if (struct.isSetMaxNodes()) { |
| optionals.set(2); |
| } |
| if (struct.isSetMaxProcessors()) { |
| optionals.set(3); |
| } |
| if (struct.isSetMaxJobsInQueue()) { |
| optionals.set(4); |
| } |
| if (struct.isSetMaxMemory()) { |
| optionals.set(5); |
| } |
| if (struct.isSetCpuPerNode()) { |
| optionals.set(6); |
| } |
| if (struct.isSetDefaultNodeCount()) { |
| optionals.set(7); |
| } |
| if (struct.isSetDefaultCPUCount()) { |
| optionals.set(8); |
| } |
| if (struct.isSetDefaultWalltime()) { |
| optionals.set(9); |
| } |
| if (struct.isSetQueueSpecificMacros()) { |
| optionals.set(10); |
| } |
| if (struct.isSetIsDefaultQueue()) { |
| optionals.set(11); |
| } |
| oprot.writeBitSet(optionals, 12); |
| if (struct.isSetQueueDescription()) { |
| oprot.writeString(struct.queueDescription); |
| } |
| if (struct.isSetMaxRunTime()) { |
| oprot.writeI32(struct.maxRunTime); |
| } |
| if (struct.isSetMaxNodes()) { |
| oprot.writeI32(struct.maxNodes); |
| } |
| if (struct.isSetMaxProcessors()) { |
| oprot.writeI32(struct.maxProcessors); |
| } |
| if (struct.isSetMaxJobsInQueue()) { |
| oprot.writeI32(struct.maxJobsInQueue); |
| } |
| if (struct.isSetMaxMemory()) { |
| oprot.writeI32(struct.maxMemory); |
| } |
| if (struct.isSetCpuPerNode()) { |
| oprot.writeI32(struct.cpuPerNode); |
| } |
| if (struct.isSetDefaultNodeCount()) { |
| oprot.writeI32(struct.defaultNodeCount); |
| } |
| if (struct.isSetDefaultCPUCount()) { |
| oprot.writeI32(struct.defaultCPUCount); |
| } |
| if (struct.isSetDefaultWalltime()) { |
| oprot.writeI32(struct.defaultWalltime); |
| } |
| if (struct.isSetQueueSpecificMacros()) { |
| oprot.writeString(struct.queueSpecificMacros); |
| } |
| if (struct.isSetIsDefaultQueue()) { |
| oprot.writeBool(struct.isDefaultQueue); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, BatchQueue struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| struct.queueName = iprot.readString(); |
| struct.setQueueNameIsSet(true); |
| java.util.BitSet incoming = iprot.readBitSet(12); |
| if (incoming.get(0)) { |
| struct.queueDescription = iprot.readString(); |
| struct.setQueueDescriptionIsSet(true); |
| } |
| if (incoming.get(1)) { |
| struct.maxRunTime = iprot.readI32(); |
| struct.setMaxRunTimeIsSet(true); |
| } |
| if (incoming.get(2)) { |
| struct.maxNodes = iprot.readI32(); |
| struct.setMaxNodesIsSet(true); |
| } |
| if (incoming.get(3)) { |
| struct.maxProcessors = iprot.readI32(); |
| struct.setMaxProcessorsIsSet(true); |
| } |
| if (incoming.get(4)) { |
| struct.maxJobsInQueue = iprot.readI32(); |
| struct.setMaxJobsInQueueIsSet(true); |
| } |
| if (incoming.get(5)) { |
| struct.maxMemory = iprot.readI32(); |
| struct.setMaxMemoryIsSet(true); |
| } |
| if (incoming.get(6)) { |
| struct.cpuPerNode = iprot.readI32(); |
| struct.setCpuPerNodeIsSet(true); |
| } |
| if (incoming.get(7)) { |
| struct.defaultNodeCount = iprot.readI32(); |
| struct.setDefaultNodeCountIsSet(true); |
| } |
| if (incoming.get(8)) { |
| struct.defaultCPUCount = iprot.readI32(); |
| struct.setDefaultCPUCountIsSet(true); |
| } |
| if (incoming.get(9)) { |
| struct.defaultWalltime = iprot.readI32(); |
| struct.setDefaultWalltimeIsSet(true); |
| } |
| if (incoming.get(10)) { |
| struct.queueSpecificMacros = iprot.readString(); |
| struct.setQueueSpecificMacrosIsSet(true); |
| } |
| if (incoming.get(11)) { |
| struct.isDefaultQueue = iprot.readBool(); |
| struct.setIsDefaultQueueIsSet(true); |
| } |
| } |
| } |
| |
| 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(); |
| } |
| } |
| |