/**
* Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package com.facebook.buck.distributed.thrift;
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"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2017-05-03")
public class BuildSlaveStatus implements org.apache.thrift.TBase<BuildSlaveStatus, BuildSlaveStatus._Fields>, java.io.Serializable, Cloneable, Comparable<BuildSlaveStatus> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BuildSlaveStatus");
private static final org.apache.thrift.protocol.TField STAMPEDE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("stampedeId", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField RUN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("runId", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField TOTAL_RULES_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("totalRulesCount", org.apache.thrift.protocol.TType.I32, (short)10);
private static final org.apache.thrift.protocol.TField RULES_STARTED_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("rulesStartedCount", org.apache.thrift.protocol.TType.I32, (short)11);
private static final org.apache.thrift.protocol.TField RULES_FINISHED_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("rulesFinishedCount", org.apache.thrift.protocol.TType.I32, (short)12);
private static final org.apache.thrift.protocol.TField RULES_SUCCESS_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("rulesSuccessCount", org.apache.thrift.protocol.TType.I32, (short)13);
private static final org.apache.thrift.protocol.TField RULES_FAILURE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("rulesFailureCount", org.apache.thrift.protocol.TType.I32, (short)14);
private static final org.apache.thrift.protocol.TField CACHE_RATE_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("cacheRateStats", org.apache.thrift.protocol.TType.STRUCT, (short)20);
private static final org.apache.thrift.protocol.TField HTTP_ARTIFACT_TOTAL_BYTES_UPLOADED_FIELD_DESC = new org.apache.thrift.protocol.TField("httpArtifactTotalBytesUploaded", org.apache.thrift.protocol.TType.I64, (short)21);
private static final org.apache.thrift.protocol.TField HTTP_ARTIFACT_UPLOAD_SCHEDULED_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("httpArtifactUploadScheduledCount", org.apache.thrift.protocol.TType.I32, (short)22);
private static final org.apache.thrift.protocol.TField HTTP_ARTIFACT_UPLOAD_STARTED_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("httpArtifactUploadStartedCount", org.apache.thrift.protocol.TType.I32, (short)23);
private static final org.apache.thrift.protocol.TField HTTP_ARTIFACT_UPLOAD_SUCCESS_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("httpArtifactUploadSuccessCount", org.apache.thrift.protocol.TType.I32, (short)24);
private static final org.apache.thrift.protocol.TField HTTP_ARTIFACT_UPLOAD_FAILURE_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("httpArtifactUploadFailureCount", org.apache.thrift.protocol.TType.I32, (short)25);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new BuildSlaveStatusStandardSchemeFactory());
schemes.put(TupleScheme.class, new BuildSlaveStatusTupleSchemeFactory());
}
public com.facebook.buck.distributed.thrift.StampedeId stampedeId; // optional
public com.facebook.buck.distributed.thrift.RunId runId; // optional
public int totalRulesCount; // optional
public int rulesStartedCount; // optional
public int rulesFinishedCount; // optional
public int rulesSuccessCount; // optional
public int rulesFailureCount; // optional
public CacheRateStats cacheRateStats; // optional
public long httpArtifactTotalBytesUploaded; // optional
public int httpArtifactUploadScheduledCount; // optional
public int httpArtifactUploadStartedCount; // optional
public int httpArtifactUploadSuccessCount; // optional
public int httpArtifactUploadFailureCount; // 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 {
STAMPEDE_ID((short)1, "stampedeId"),
RUN_ID((short)2, "runId"),
TOTAL_RULES_COUNT((short)10, "totalRulesCount"),
RULES_STARTED_COUNT((short)11, "rulesStartedCount"),
RULES_FINISHED_COUNT((short)12, "rulesFinishedCount"),
RULES_SUCCESS_COUNT((short)13, "rulesSuccessCount"),
RULES_FAILURE_COUNT((short)14, "rulesFailureCount"),
CACHE_RATE_STATS((short)20, "cacheRateStats"),
HTTP_ARTIFACT_TOTAL_BYTES_UPLOADED((short)21, "httpArtifactTotalBytesUploaded"),
HTTP_ARTIFACT_UPLOAD_SCHEDULED_COUNT((short)22, "httpArtifactUploadScheduledCount"),
HTTP_ARTIFACT_UPLOAD_STARTED_COUNT((short)23, "httpArtifactUploadStartedCount"),
HTTP_ARTIFACT_UPLOAD_SUCCESS_COUNT((short)24, "httpArtifactUploadSuccessCount"),
HTTP_ARTIFACT_UPLOAD_FAILURE_COUNT((short)25, "httpArtifactUploadFailureCount");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
static {
for (_Fields field : 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: // STAMPEDE_ID
return STAMPEDE_ID;
case 2: // RUN_ID
return RUN_ID;
case 10: // TOTAL_RULES_COUNT
return TOTAL_RULES_COUNT;
case 11: // RULES_STARTED_COUNT
return RULES_STARTED_COUNT;
case 12: // RULES_FINISHED_COUNT
return RULES_FINISHED_COUNT;
case 13: // RULES_SUCCESS_COUNT
return RULES_SUCCESS_COUNT;
case 14: // RULES_FAILURE_COUNT
return RULES_FAILURE_COUNT;
case 20: // CACHE_RATE_STATS
return CACHE_RATE_STATS;
case 21: // HTTP_ARTIFACT_TOTAL_BYTES_UPLOADED
return HTTP_ARTIFACT_TOTAL_BYTES_UPLOADED;
case 22: // HTTP_ARTIFACT_UPLOAD_SCHEDULED_COUNT
return HTTP_ARTIFACT_UPLOAD_SCHEDULED_COUNT;
case 23: // HTTP_ARTIFACT_UPLOAD_STARTED_COUNT
return HTTP_ARTIFACT_UPLOAD_STARTED_COUNT;
case 24: // HTTP_ARTIFACT_UPLOAD_SUCCESS_COUNT
return HTTP_ARTIFACT_UPLOAD_SUCCESS_COUNT;
case 25: // HTTP_ARTIFACT_UPLOAD_FAILURE_COUNT
return HTTP_ARTIFACT_UPLOAD_FAILURE_COUNT;
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 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) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __TOTALRULESCOUNT_ISSET_ID = 0;
private static final int __RULESSTARTEDCOUNT_ISSET_ID = 1;
private static final int __RULESFINISHEDCOUNT_ISSET_ID = 2;
private static final int __RULESSUCCESSCOUNT_ISSET_ID = 3;
private static final int __RULESFAILURECOUNT_ISSET_ID = 4;
private static final int __HTTPARTIFACTTOTALBYTESUPLOADED_ISSET_ID = 5;
private static final int __HTTPARTIFACTUPLOADSCHEDULEDCOUNT_ISSET_ID = 6;
private static final int __HTTPARTIFACTUPLOADSTARTEDCOUNT_ISSET_ID = 7;
private static final int __HTTPARTIFACTUPLOADSUCCESSCOUNT_ISSET_ID = 8;
private static final int __HTTPARTIFACTUPLOADFAILURECOUNT_ISSET_ID = 9;
private short __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.STAMPEDE_ID,_Fields.RUN_ID,_Fields.TOTAL_RULES_COUNT,_Fields.RULES_STARTED_COUNT,_Fields.RULES_FINISHED_COUNT,_Fields.RULES_SUCCESS_COUNT,_Fields.RULES_FAILURE_COUNT,_Fields.CACHE_RATE_STATS,_Fields.HTTP_ARTIFACT_TOTAL_BYTES_UPLOADED,_Fields.HTTP_ARTIFACT_UPLOAD_SCHEDULED_COUNT,_Fields.HTTP_ARTIFACT_UPLOAD_STARTED_COUNT,_Fields.HTTP_ARTIFACT_UPLOAD_SUCCESS_COUNT,_Fields.HTTP_ARTIFACT_UPLOAD_FAILURE_COUNT};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.STAMPEDE_ID, new org.apache.thrift.meta_data.FieldMetaData("stampedeId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, com.facebook.buck.distributed.thrift.StampedeId.class)));
tmpMap.put(_Fields.RUN_ID, new org.apache.thrift.meta_data.FieldMetaData("runId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, com.facebook.buck.distributed.thrift.RunId.class)));
tmpMap.put(_Fields.TOTAL_RULES_COUNT, new org.apache.thrift.meta_data.FieldMetaData("totalRulesCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.RULES_STARTED_COUNT, new org.apache.thrift.meta_data.FieldMetaData("rulesStartedCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.RULES_FINISHED_COUNT, new org.apache.thrift.meta_data.FieldMetaData("rulesFinishedCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.RULES_SUCCESS_COUNT, new org.apache.thrift.meta_data.FieldMetaData("rulesSuccessCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.RULES_FAILURE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("rulesFailureCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.CACHE_RATE_STATS, new org.apache.thrift.meta_data.FieldMetaData("cacheRateStats", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CacheRateStats.class)));
tmpMap.put(_Fields.HTTP_ARTIFACT_TOTAL_BYTES_UPLOADED, new org.apache.thrift.meta_data.FieldMetaData("httpArtifactTotalBytesUploaded", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.HTTP_ARTIFACT_UPLOAD_SCHEDULED_COUNT, new org.apache.thrift.meta_data.FieldMetaData("httpArtifactUploadScheduledCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.HTTP_ARTIFACT_UPLOAD_STARTED_COUNT, new org.apache.thrift.meta_data.FieldMetaData("httpArtifactUploadStartedCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.HTTP_ARTIFACT_UPLOAD_SUCCESS_COUNT, new org.apache.thrift.meta_data.FieldMetaData("httpArtifactUploadSuccessCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.HTTP_ARTIFACT_UPLOAD_FAILURE_COUNT, new org.apache.thrift.meta_data.FieldMetaData("httpArtifactUploadFailureCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BuildSlaveStatus.class, metaDataMap);
}
public BuildSlaveStatus() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public BuildSlaveStatus(BuildSlaveStatus other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetStampedeId()) {
this.stampedeId = new com.facebook.buck.distributed.thrift.StampedeId(other.stampedeId);
}
if (other.isSetRunId()) {
this.runId = new com.facebook.buck.distributed.thrift.RunId(other.runId);
}
this.totalRulesCount = other.totalRulesCount;
this.rulesStartedCount = other.rulesStartedCount;
this.rulesFinishedCount = other.rulesFinishedCount;
this.rulesSuccessCount = other.rulesSuccessCount;
this.rulesFailureCount = other.rulesFailureCount;
if (other.isSetCacheRateStats()) {
this.cacheRateStats = new CacheRateStats(other.cacheRateStats);
}
this.httpArtifactTotalBytesUploaded = other.httpArtifactTotalBytesUploaded;
this.httpArtifactUploadScheduledCount = other.httpArtifactUploadScheduledCount;
this.httpArtifactUploadStartedCount = other.httpArtifactUploadStartedCount;
this.httpArtifactUploadSuccessCount = other.httpArtifactUploadSuccessCount;
this.httpArtifactUploadFailureCount = other.httpArtifactUploadFailureCount;
}
public BuildSlaveStatus deepCopy() {
return new BuildSlaveStatus(this);
}
@Override
public void clear() {
this.stampedeId = null;
this.runId = null;
setTotalRulesCountIsSet(false);
this.totalRulesCount = 0;
setRulesStartedCountIsSet(false);
this.rulesStartedCount = 0;
setRulesFinishedCountIsSet(false);
this.rulesFinishedCount = 0;
setRulesSuccessCountIsSet(false);
this.rulesSuccessCount = 0;
setRulesFailureCountIsSet(false);
this.rulesFailureCount = 0;
this.cacheRateStats = null;
setHttpArtifactTotalBytesUploadedIsSet(false);
this.httpArtifactTotalBytesUploaded = 0;
setHttpArtifactUploadScheduledCountIsSet(false);
this.httpArtifactUploadScheduledCount = 0;
setHttpArtifactUploadStartedCountIsSet(false);
this.httpArtifactUploadStartedCount = 0;
setHttpArtifactUploadSuccessCountIsSet(false);
this.httpArtifactUploadSuccessCount = 0;
setHttpArtifactUploadFailureCountIsSet(false);
this.httpArtifactUploadFailureCount = 0;
}
public com.facebook.buck.distributed.thrift.StampedeId getStampedeId() {
return this.stampedeId;
}
public BuildSlaveStatus setStampedeId(com.facebook.buck.distributed.thrift.StampedeId stampedeId) {
this.stampedeId = stampedeId;
return this;
}
public void unsetStampedeId() {
this.stampedeId = null;
}
/** Returns true if field stampedeId is set (has been assigned a value) and false otherwise */
public boolean isSetStampedeId() {
return this.stampedeId != null;
}
public void setStampedeIdIsSet(boolean value) {
if (!value) {
this.stampedeId = null;
}
}
public com.facebook.buck.distributed.thrift.RunId getRunId() {
return this.runId;
}
public BuildSlaveStatus setRunId(com.facebook.buck.distributed.thrift.RunId runId) {
this.runId = runId;
return this;
}
public void unsetRunId() {
this.runId = null;
}
/** Returns true if field runId is set (has been assigned a value) and false otherwise */
public boolean isSetRunId() {
return this.runId != null;
}
public void setRunIdIsSet(boolean value) {
if (!value) {
this.runId = null;
}
}
public int getTotalRulesCount() {
return this.totalRulesCount;
}
public BuildSlaveStatus setTotalRulesCount(int totalRulesCount) {
this.totalRulesCount = totalRulesCount;
setTotalRulesCountIsSet(true);
return this;
}
public void unsetTotalRulesCount() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOTALRULESCOUNT_ISSET_ID);
}
/** Returns true if field totalRulesCount is set (has been assigned a value) and false otherwise */
public boolean isSetTotalRulesCount() {
return EncodingUtils.testBit(__isset_bitfield, __TOTALRULESCOUNT_ISSET_ID);
}
public void setTotalRulesCountIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOTALRULESCOUNT_ISSET_ID, value);
}
public int getRulesStartedCount() {
return this.rulesStartedCount;
}
public BuildSlaveStatus setRulesStartedCount(int rulesStartedCount) {
this.rulesStartedCount = rulesStartedCount;
setRulesStartedCountIsSet(true);
return this;
}
public void unsetRulesStartedCount() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RULESSTARTEDCOUNT_ISSET_ID);
}
/** Returns true if field rulesStartedCount is set (has been assigned a value) and false otherwise */
public boolean isSetRulesStartedCount() {
return EncodingUtils.testBit(__isset_bitfield, __RULESSTARTEDCOUNT_ISSET_ID);
}
public void setRulesStartedCountIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RULESSTARTEDCOUNT_ISSET_ID, value);
}
public int getRulesFinishedCount() {
return this.rulesFinishedCount;
}
public BuildSlaveStatus setRulesFinishedCount(int rulesFinishedCount) {
this.rulesFinishedCount = rulesFinishedCount;
setRulesFinishedCountIsSet(true);
return this;
}
public void unsetRulesFinishedCount() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RULESFINISHEDCOUNT_ISSET_ID);
}
/** Returns true if field rulesFinishedCount is set (has been assigned a value) and false otherwise */
public boolean isSetRulesFinishedCount() {
return EncodingUtils.testBit(__isset_bitfield, __RULESFINISHEDCOUNT_ISSET_ID);
}
public void setRulesFinishedCountIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RULESFINISHEDCOUNT_ISSET_ID, value);
}
public int getRulesSuccessCount() {
return this.rulesSuccessCount;
}
public BuildSlaveStatus setRulesSuccessCount(int rulesSuccessCount) {
this.rulesSuccessCount = rulesSuccessCount;
setRulesSuccessCountIsSet(true);
return this;
}
public void unsetRulesSuccessCount() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RULESSUCCESSCOUNT_ISSET_ID);
}
/** Returns true if field rulesSuccessCount is set (has been assigned a value) and false otherwise */
public boolean isSetRulesSuccessCount() {
return EncodingUtils.testBit(__isset_bitfield, __RULESSUCCESSCOUNT_ISSET_ID);
}
public void setRulesSuccessCountIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RULESSUCCESSCOUNT_ISSET_ID, value);
}
public int getRulesFailureCount() {
return this.rulesFailureCount;
}
public BuildSlaveStatus setRulesFailureCount(int rulesFailureCount) {
this.rulesFailureCount = rulesFailureCount;
setRulesFailureCountIsSet(true);
return this;
}
public void unsetRulesFailureCount() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RULESFAILURECOUNT_ISSET_ID);
}
/** Returns true if field rulesFailureCount is set (has been assigned a value) and false otherwise */
public boolean isSetRulesFailureCount() {
return EncodingUtils.testBit(__isset_bitfield, __RULESFAILURECOUNT_ISSET_ID);
}
public void setRulesFailureCountIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RULESFAILURECOUNT_ISSET_ID, value);
}
public CacheRateStats getCacheRateStats() {
return this.cacheRateStats;
}
public BuildSlaveStatus setCacheRateStats(CacheRateStats cacheRateStats) {
this.cacheRateStats = cacheRateStats;
return this;
}
public void unsetCacheRateStats() {
this.cacheRateStats = null;
}
/** Returns true if field cacheRateStats is set (has been assigned a value) and false otherwise */
public boolean isSetCacheRateStats() {
return this.cacheRateStats != null;
}
public void setCacheRateStatsIsSet(boolean value) {
if (!value) {
this.cacheRateStats = null;
}
}
public long getHttpArtifactTotalBytesUploaded() {
return this.httpArtifactTotalBytesUploaded;
}
public BuildSlaveStatus setHttpArtifactTotalBytesUploaded(long httpArtifactTotalBytesUploaded) {
this.httpArtifactTotalBytesUploaded = httpArtifactTotalBytesUploaded;
setHttpArtifactTotalBytesUploadedIsSet(true);
return this;
}
public void unsetHttpArtifactTotalBytesUploaded() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HTTPARTIFACTTOTALBYTESUPLOADED_ISSET_ID);
}
/** Returns true if field httpArtifactTotalBytesUploaded is set (has been assigned a value) and false otherwise */
public boolean isSetHttpArtifactTotalBytesUploaded() {
return EncodingUtils.testBit(__isset_bitfield, __HTTPARTIFACTTOTALBYTESUPLOADED_ISSET_ID);
}
public void setHttpArtifactTotalBytesUploadedIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HTTPARTIFACTTOTALBYTESUPLOADED_ISSET_ID, value);
}
public int getHttpArtifactUploadScheduledCount() {
return this.httpArtifactUploadScheduledCount;
}
public BuildSlaveStatus setHttpArtifactUploadScheduledCount(int httpArtifactUploadScheduledCount) {
this.httpArtifactUploadScheduledCount = httpArtifactUploadScheduledCount;
setHttpArtifactUploadScheduledCountIsSet(true);
return this;
}
public void unsetHttpArtifactUploadScheduledCount() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HTTPARTIFACTUPLOADSCHEDULEDCOUNT_ISSET_ID);
}
/** Returns true if field httpArtifactUploadScheduledCount is set (has been assigned a value) and false otherwise */
public boolean isSetHttpArtifactUploadScheduledCount() {
return EncodingUtils.testBit(__isset_bitfield, __HTTPARTIFACTUPLOADSCHEDULEDCOUNT_ISSET_ID);
}
public void setHttpArtifactUploadScheduledCountIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HTTPARTIFACTUPLOADSCHEDULEDCOUNT_ISSET_ID, value);
}
public int getHttpArtifactUploadStartedCount() {
return this.httpArtifactUploadStartedCount;
}
public BuildSlaveStatus setHttpArtifactUploadStartedCount(int httpArtifactUploadStartedCount) {
this.httpArtifactUploadStartedCount = httpArtifactUploadStartedCount;
setHttpArtifactUploadStartedCountIsSet(true);
return this;
}
public void unsetHttpArtifactUploadStartedCount() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HTTPARTIFACTUPLOADSTARTEDCOUNT_ISSET_ID);
}
/** Returns true if field httpArtifactUploadStartedCount is set (has been assigned a value) and false otherwise */
public boolean isSetHttpArtifactUploadStartedCount() {
return EncodingUtils.testBit(__isset_bitfield, __HTTPARTIFACTUPLOADSTARTEDCOUNT_ISSET_ID);
}
public void setHttpArtifactUploadStartedCountIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HTTPARTIFACTUPLOADSTARTEDCOUNT_ISSET_ID, value);
}
public int getHttpArtifactUploadSuccessCount() {
return this.httpArtifactUploadSuccessCount;
}
public BuildSlaveStatus setHttpArtifactUploadSuccessCount(int httpArtifactUploadSuccessCount) {
this.httpArtifactUploadSuccessCount = httpArtifactUploadSuccessCount;
setHttpArtifactUploadSuccessCountIsSet(true);
return this;
}
public void unsetHttpArtifactUploadSuccessCount() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HTTPARTIFACTUPLOADSUCCESSCOUNT_ISSET_ID);
}
/** Returns true if field httpArtifactUploadSuccessCount is set (has been assigned a value) and false otherwise */
public boolean isSetHttpArtifactUploadSuccessCount() {
return EncodingUtils.testBit(__isset_bitfield, __HTTPARTIFACTUPLOADSUCCESSCOUNT_ISSET_ID);
}
public void setHttpArtifactUploadSuccessCountIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HTTPARTIFACTUPLOADSUCCESSCOUNT_ISSET_ID, value);
}
public int getHttpArtifactUploadFailureCount() {
return this.httpArtifactUploadFailureCount;
}
public BuildSlaveStatus setHttpArtifactUploadFailureCount(int httpArtifactUploadFailureCount) {
this.httpArtifactUploadFailureCount = httpArtifactUploadFailureCount;
setHttpArtifactUploadFailureCountIsSet(true);
return this;
}
public void unsetHttpArtifactUploadFailureCount() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HTTPARTIFACTUPLOADFAILURECOUNT_ISSET_ID);
}
/** Returns true if field httpArtifactUploadFailureCount is set (has been assigned a value) and false otherwise */
public boolean isSetHttpArtifactUploadFailureCount() {
return EncodingUtils.testBit(__isset_bitfield, __HTTPARTIFACTUPLOADFAILURECOUNT_ISSET_ID);
}
public void setHttpArtifactUploadFailureCountIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HTTPARTIFACTUPLOADFAILURECOUNT_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case STAMPEDE_ID:
if (value == null) {
unsetStampedeId();
} else {
setStampedeId((com.facebook.buck.distributed.thrift.StampedeId)value);
}
break;
case RUN_ID:
if (value == null) {
unsetRunId();
} else {
setRunId((com.facebook.buck.distributed.thrift.RunId)value);
}
break;
case TOTAL_RULES_COUNT:
if (value == null) {
unsetTotalRulesCount();
} else {
setTotalRulesCount((Integer)value);
}
break;
case RULES_STARTED_COUNT:
if (value == null) {
unsetRulesStartedCount();
} else {
setRulesStartedCount((Integer)value);
}
break;
case RULES_FINISHED_COUNT:
if (value == null) {
unsetRulesFinishedCount();
} else {
setRulesFinishedCount((Integer)value);
}
break;
case RULES_SUCCESS_COUNT:
if (value == null) {
unsetRulesSuccessCount();
} else {
setRulesSuccessCount((Integer)value);
}
break;
case RULES_FAILURE_COUNT:
if (value == null) {
unsetRulesFailureCount();
} else {
setRulesFailureCount((Integer)value);
}
break;
case CACHE_RATE_STATS:
if (value == null) {
unsetCacheRateStats();
} else {
setCacheRateStats((CacheRateStats)value);
}
break;
case HTTP_ARTIFACT_TOTAL_BYTES_UPLOADED:
if (value == null) {
unsetHttpArtifactTotalBytesUploaded();
} else {
setHttpArtifactTotalBytesUploaded((Long)value);
}
break;
case HTTP_ARTIFACT_UPLOAD_SCHEDULED_COUNT:
if (value == null) {
unsetHttpArtifactUploadScheduledCount();
} else {
setHttpArtifactUploadScheduledCount((Integer)value);
}
break;
case HTTP_ARTIFACT_UPLOAD_STARTED_COUNT:
if (value == null) {
unsetHttpArtifactUploadStartedCount();
} else {
setHttpArtifactUploadStartedCount((Integer)value);
}
break;
case HTTP_ARTIFACT_UPLOAD_SUCCESS_COUNT:
if (value == null) {
unsetHttpArtifactUploadSuccessCount();
} else {
setHttpArtifactUploadSuccessCount((Integer)value);
}
break;
case HTTP_ARTIFACT_UPLOAD_FAILURE_COUNT:
if (value == null) {
unsetHttpArtifactUploadFailureCount();
} else {
setHttpArtifactUploadFailureCount((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case STAMPEDE_ID:
return getStampedeId();
case RUN_ID:
return getRunId();
case TOTAL_RULES_COUNT:
return getTotalRulesCount();
case RULES_STARTED_COUNT:
return getRulesStartedCount();
case RULES_FINISHED_COUNT:
return getRulesFinishedCount();
case RULES_SUCCESS_COUNT:
return getRulesSuccessCount();
case RULES_FAILURE_COUNT:
return getRulesFailureCount();
case CACHE_RATE_STATS:
return getCacheRateStats();
case HTTP_ARTIFACT_TOTAL_BYTES_UPLOADED:
return getHttpArtifactTotalBytesUploaded();
case HTTP_ARTIFACT_UPLOAD_SCHEDULED_COUNT:
return getHttpArtifactUploadScheduledCount();
case HTTP_ARTIFACT_UPLOAD_STARTED_COUNT:
return getHttpArtifactUploadStartedCount();
case HTTP_ARTIFACT_UPLOAD_SUCCESS_COUNT:
return getHttpArtifactUploadSuccessCount();
case HTTP_ARTIFACT_UPLOAD_FAILURE_COUNT:
return getHttpArtifactUploadFailureCount();
}
throw new 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();
}
switch (field) {
case STAMPEDE_ID:
return isSetStampedeId();
case RUN_ID:
return isSetRunId();
case TOTAL_RULES_COUNT:
return isSetTotalRulesCount();
case RULES_STARTED_COUNT:
return isSetRulesStartedCount();
case RULES_FINISHED_COUNT:
return isSetRulesFinishedCount();
case RULES_SUCCESS_COUNT:
return isSetRulesSuccessCount();
case RULES_FAILURE_COUNT:
return isSetRulesFailureCount();
case CACHE_RATE_STATS:
return isSetCacheRateStats();
case HTTP_ARTIFACT_TOTAL_BYTES_UPLOADED:
return isSetHttpArtifactTotalBytesUploaded();
case HTTP_ARTIFACT_UPLOAD_SCHEDULED_COUNT:
return isSetHttpArtifactUploadScheduledCount();
case HTTP_ARTIFACT_UPLOAD_STARTED_COUNT:
return isSetHttpArtifactUploadStartedCount();
case HTTP_ARTIFACT_UPLOAD_SUCCESS_COUNT:
return isSetHttpArtifactUploadSuccessCount();
case HTTP_ARTIFACT_UPLOAD_FAILURE_COUNT:
return isSetHttpArtifactUploadFailureCount();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof BuildSlaveStatus)
return this.equals((BuildSlaveStatus)that);
return false;
}
public boolean equals(BuildSlaveStatus that) {
if (that == null)
return false;
boolean this_present_stampedeId = true && this.isSetStampedeId();
boolean that_present_stampedeId = true && that.isSetStampedeId();
if (this_present_stampedeId || that_present_stampedeId) {
if (!(this_present_stampedeId && that_present_stampedeId))
return false;
if (!this.stampedeId.equals(that.stampedeId))
return false;
}
boolean this_present_runId = true && this.isSetRunId();
boolean that_present_runId = true && that.isSetRunId();
if (this_present_runId || that_present_runId) {
if (!(this_present_runId && that_present_runId))
return false;
if (!this.runId.equals(that.runId))
return false;
}
boolean this_present_totalRulesCount = true && this.isSetTotalRulesCount();
boolean that_present_totalRulesCount = true && that.isSetTotalRulesCount();
if (this_present_totalRulesCount || that_present_totalRulesCount) {
if (!(this_present_totalRulesCount && that_present_totalRulesCount))
return false;
if (this.totalRulesCount != that.totalRulesCount)
return false;
}
boolean this_present_rulesStartedCount = true && this.isSetRulesStartedCount();
boolean that_present_rulesStartedCount = true && that.isSetRulesStartedCount();
if (this_present_rulesStartedCount || that_present_rulesStartedCount) {
if (!(this_present_rulesStartedCount && that_present_rulesStartedCount))
return false;
if (this.rulesStartedCount != that.rulesStartedCount)
return false;
}
boolean this_present_rulesFinishedCount = true && this.isSetRulesFinishedCount();
boolean that_present_rulesFinishedCount = true && that.isSetRulesFinishedCount();
if (this_present_rulesFinishedCount || that_present_rulesFinishedCount) {
if (!(this_present_rulesFinishedCount && that_present_rulesFinishedCount))
return false;
if (this.rulesFinishedCount != that.rulesFinishedCount)
return false;
}
boolean this_present_rulesSuccessCount = true && this.isSetRulesSuccessCount();
boolean that_present_rulesSuccessCount = true && that.isSetRulesSuccessCount();
if (this_present_rulesSuccessCount || that_present_rulesSuccessCount) {
if (!(this_present_rulesSuccessCount && that_present_rulesSuccessCount))
return false;
if (this.rulesSuccessCount != that.rulesSuccessCount)
return false;
}
boolean this_present_rulesFailureCount = true && this.isSetRulesFailureCount();
boolean that_present_rulesFailureCount = true && that.isSetRulesFailureCount();
if (this_present_rulesFailureCount || that_present_rulesFailureCount) {
if (!(this_present_rulesFailureCount && that_present_rulesFailureCount))
return false;
if (this.rulesFailureCount != that.rulesFailureCount)
return false;
}
boolean this_present_cacheRateStats = true && this.isSetCacheRateStats();
boolean that_present_cacheRateStats = true && that.isSetCacheRateStats();
if (this_present_cacheRateStats || that_present_cacheRateStats) {
if (!(this_present_cacheRateStats && that_present_cacheRateStats))
return false;
if (!this.cacheRateStats.equals(that.cacheRateStats))
return false;
}
boolean this_present_httpArtifactTotalBytesUploaded = true && this.isSetHttpArtifactTotalBytesUploaded();
boolean that_present_httpArtifactTotalBytesUploaded = true && that.isSetHttpArtifactTotalBytesUploaded();
if (this_present_httpArtifactTotalBytesUploaded || that_present_httpArtifactTotalBytesUploaded) {
if (!(this_present_httpArtifactTotalBytesUploaded && that_present_httpArtifactTotalBytesUploaded))
return false;
if (this.httpArtifactTotalBytesUploaded != that.httpArtifactTotalBytesUploaded)
return false;
}
boolean this_present_httpArtifactUploadScheduledCount = true && this.isSetHttpArtifactUploadScheduledCount();
boolean that_present_httpArtifactUploadScheduledCount = true && that.isSetHttpArtifactUploadScheduledCount();
if (this_present_httpArtifactUploadScheduledCount || that_present_httpArtifactUploadScheduledCount) {
if (!(this_present_httpArtifactUploadScheduledCount && that_present_httpArtifactUploadScheduledCount))
return false;
if (this.httpArtifactUploadScheduledCount != that.httpArtifactUploadScheduledCount)
return false;
}
boolean this_present_httpArtifactUploadStartedCount = true && this.isSetHttpArtifactUploadStartedCount();
boolean that_present_httpArtifactUploadStartedCount = true && that.isSetHttpArtifactUploadStartedCount();
if (this_present_httpArtifactUploadStartedCount || that_present_httpArtifactUploadStartedCount) {
if (!(this_present_httpArtifactUploadStartedCount && that_present_httpArtifactUploadStartedCount))
return false;
if (this.httpArtifactUploadStartedCount != that.httpArtifactUploadStartedCount)
return false;
}
boolean this_present_httpArtifactUploadSuccessCount = true && this.isSetHttpArtifactUploadSuccessCount();
boolean that_present_httpArtifactUploadSuccessCount = true && that.isSetHttpArtifactUploadSuccessCount();
if (this_present_httpArtifactUploadSuccessCount || that_present_httpArtifactUploadSuccessCount) {
if (!(this_present_httpArtifactUploadSuccessCount && that_present_httpArtifactUploadSuccessCount))
return false;
if (this.httpArtifactUploadSuccessCount != that.httpArtifactUploadSuccessCount)
return false;
}
boolean this_present_httpArtifactUploadFailureCount = true && this.isSetHttpArtifactUploadFailureCount();
boolean that_present_httpArtifactUploadFailureCount = true && that.isSetHttpArtifactUploadFailureCount();
if (this_present_httpArtifactUploadFailureCount || that_present_httpArtifactUploadFailureCount) {
if (!(this_present_httpArtifactUploadFailureCount && that_present_httpArtifactUploadFailureCount))
return false;
if (this.httpArtifactUploadFailureCount != that.httpArtifactUploadFailureCount)
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_stampedeId = true && (isSetStampedeId());
list.add(present_stampedeId);
if (present_stampedeId)
list.add(stampedeId);
boolean present_runId = true && (isSetRunId());
list.add(present_runId);
if (present_runId)
list.add(runId);
boolean present_totalRulesCount = true && (isSetTotalRulesCount());
list.add(present_totalRulesCount);
if (present_totalRulesCount)
list.add(totalRulesCount);
boolean present_rulesStartedCount = true && (isSetRulesStartedCount());
list.add(present_rulesStartedCount);
if (present_rulesStartedCount)
list.add(rulesStartedCount);
boolean present_rulesFinishedCount = true && (isSetRulesFinishedCount());
list.add(present_rulesFinishedCount);
if (present_rulesFinishedCount)
list.add(rulesFinishedCount);
boolean present_rulesSuccessCount = true && (isSetRulesSuccessCount());
list.add(present_rulesSuccessCount);
if (present_rulesSuccessCount)
list.add(rulesSuccessCount);
boolean present_rulesFailureCount = true && (isSetRulesFailureCount());
list.add(present_rulesFailureCount);
if (present_rulesFailureCount)
list.add(rulesFailureCount);
boolean present_cacheRateStats = true && (isSetCacheRateStats());
list.add(present_cacheRateStats);
if (present_cacheRateStats)
list.add(cacheRateStats);
boolean present_httpArtifactTotalBytesUploaded = true && (isSetHttpArtifactTotalBytesUploaded());
list.add(present_httpArtifactTotalBytesUploaded);
if (present_httpArtifactTotalBytesUploaded)
list.add(httpArtifactTotalBytesUploaded);
boolean present_httpArtifactUploadScheduledCount = true && (isSetHttpArtifactUploadScheduledCount());
list.add(present_httpArtifactUploadScheduledCount);
if (present_httpArtifactUploadScheduledCount)
list.add(httpArtifactUploadScheduledCount);
boolean present_httpArtifactUploadStartedCount = true && (isSetHttpArtifactUploadStartedCount());
list.add(present_httpArtifactUploadStartedCount);
if (present_httpArtifactUploadStartedCount)
list.add(httpArtifactUploadStartedCount);
boolean present_httpArtifactUploadSuccessCount = true && (isSetHttpArtifactUploadSuccessCount());
list.add(present_httpArtifactUploadSuccessCount);
if (present_httpArtifactUploadSuccessCount)
list.add(httpArtifactUploadSuccessCount);
boolean present_httpArtifactUploadFailureCount = true && (isSetHttpArtifactUploadFailureCount());
list.add(present_httpArtifactUploadFailureCount);
if (present_httpArtifactUploadFailureCount)
list.add(httpArtifactUploadFailureCount);
return list.hashCode();
}
@Override
public int compareTo(BuildSlaveStatus other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetStampedeId()).compareTo(other.isSetStampedeId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStampedeId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stampedeId, other.stampedeId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRunId()).compareTo(other.isSetRunId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRunId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runId, other.runId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTotalRulesCount()).compareTo(other.isSetTotalRulesCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTotalRulesCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalRulesCount, other.totalRulesCount);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRulesStartedCount()).compareTo(other.isSetRulesStartedCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRulesStartedCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rulesStartedCount, other.rulesStartedCount);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRulesFinishedCount()).compareTo(other.isSetRulesFinishedCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRulesFinishedCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rulesFinishedCount, other.rulesFinishedCount);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRulesSuccessCount()).compareTo(other.isSetRulesSuccessCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRulesSuccessCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rulesSuccessCount, other.rulesSuccessCount);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetRulesFailureCount()).compareTo(other.isSetRulesFailureCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRulesFailureCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rulesFailureCount, other.rulesFailureCount);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCacheRateStats()).compareTo(other.isSetCacheRateStats());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCacheRateStats()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cacheRateStats, other.cacheRateStats);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetHttpArtifactTotalBytesUploaded()).compareTo(other.isSetHttpArtifactTotalBytesUploaded());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHttpArtifactTotalBytesUploaded()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.httpArtifactTotalBytesUploaded, other.httpArtifactTotalBytesUploaded);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetHttpArtifactUploadScheduledCount()).compareTo(other.isSetHttpArtifactUploadScheduledCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHttpArtifactUploadScheduledCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.httpArtifactUploadScheduledCount, other.httpArtifactUploadScheduledCount);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetHttpArtifactUploadStartedCount()).compareTo(other.isSetHttpArtifactUploadStartedCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHttpArtifactUploadStartedCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.httpArtifactUploadStartedCount, other.httpArtifactUploadStartedCount);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetHttpArtifactUploadSuccessCount()).compareTo(other.isSetHttpArtifactUploadSuccessCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHttpArtifactUploadSuccessCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.httpArtifactUploadSuccessCount, other.httpArtifactUploadSuccessCount);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetHttpArtifactUploadFailureCount()).compareTo(other.isSetHttpArtifactUploadFailureCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHttpArtifactUploadFailureCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.httpArtifactUploadFailureCount, other.httpArtifactUploadFailureCount);
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 {
schemes.get(iprot.getScheme()).getScheme().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);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("BuildSlaveStatus(");
boolean first = true;
if (isSetStampedeId()) {
sb.append("stampedeId:");
if (this.stampedeId == null) {
sb.append("null");
} else {
sb.append(this.stampedeId);
}
first = false;
}
if (isSetRunId()) {
if (!first) sb.append(", ");
sb.append("runId:");
if (this.runId == null) {
sb.append("null");
} else {
sb.append(this.runId);
}
first = false;
}
if (isSetTotalRulesCount()) {
if (!first) sb.append(", ");
sb.append("totalRulesCount:");
sb.append(this.totalRulesCount);
first = false;
}
if (isSetRulesStartedCount()) {
if (!first) sb.append(", ");
sb.append("rulesStartedCount:");
sb.append(this.rulesStartedCount);
first = false;
}
if (isSetRulesFinishedCount()) {
if (!first) sb.append(", ");
sb.append("rulesFinishedCount:");
sb.append(this.rulesFinishedCount);
first = false;
}
if (isSetRulesSuccessCount()) {
if (!first) sb.append(", ");
sb.append("rulesSuccessCount:");
sb.append(this.rulesSuccessCount);
first = false;
}
if (isSetRulesFailureCount()) {
if (!first) sb.append(", ");
sb.append("rulesFailureCount:");
sb.append(this.rulesFailureCount);
first = false;
}
if (isSetCacheRateStats()) {
if (!first) sb.append(", ");
sb.append("cacheRateStats:");
if (this.cacheRateStats == null) {
sb.append("null");
} else {
sb.append(this.cacheRateStats);
}
first = false;
}
if (isSetHttpArtifactTotalBytesUploaded()) {
if (!first) sb.append(", ");
sb.append("httpArtifactTotalBytesUploaded:");
sb.append(this.httpArtifactTotalBytesUploaded);
first = false;
}
if (isSetHttpArtifactUploadScheduledCount()) {
if (!first) sb.append(", ");
sb.append("httpArtifactUploadScheduledCount:");
sb.append(this.httpArtifactUploadScheduledCount);
first = false;
}
if (isSetHttpArtifactUploadStartedCount()) {
if (!first) sb.append(", ");
sb.append("httpArtifactUploadStartedCount:");
sb.append(this.httpArtifactUploadStartedCount);
first = false;
}
if (isSetHttpArtifactUploadSuccessCount()) {
if (!first) sb.append(", ");
sb.append("httpArtifactUploadSuccessCount:");
sb.append(this.httpArtifactUploadSuccessCount);
first = false;
}
if (isSetHttpArtifactUploadFailureCount()) {
if (!first) sb.append(", ");
sb.append("httpArtifactUploadFailureCount:");
sb.append(this.httpArtifactUploadFailureCount);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (stampedeId != null) {
stampedeId.validate();
}
if (runId != null) {
runId.validate();
}
if (cacheRateStats != null) {
cacheRateStats.validate();
}
}
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, 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 BuildSlaveStatusStandardSchemeFactory implements SchemeFactory {
public BuildSlaveStatusStandardScheme getScheme() {
return new BuildSlaveStatusStandardScheme();
}
}
private static class BuildSlaveStatusStandardScheme extends StandardScheme<BuildSlaveStatus> {
public void read(org.apache.thrift.protocol.TProtocol iprot, BuildSlaveStatus 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: // STAMPEDE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.stampedeId = new com.facebook.buck.distributed.thrift.StampedeId();
struct.stampedeId.read(iprot);
struct.setStampedeIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // RUN_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.runId = new com.facebook.buck.distributed.thrift.RunId();
struct.runId.read(iprot);
struct.setRunIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // TOTAL_RULES_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.totalRulesCount = iprot.readI32();
struct.setTotalRulesCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // RULES_STARTED_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.rulesStartedCount = iprot.readI32();
struct.setRulesStartedCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // RULES_FINISHED_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.rulesFinishedCount = iprot.readI32();
struct.setRulesFinishedCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 13: // RULES_SUCCESS_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.rulesSuccessCount = iprot.readI32();
struct.setRulesSuccessCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 14: // RULES_FAILURE_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.rulesFailureCount = iprot.readI32();
struct.setRulesFailureCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 20: // CACHE_RATE_STATS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.cacheRateStats = new CacheRateStats();
struct.cacheRateStats.read(iprot);
struct.setCacheRateStatsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 21: // HTTP_ARTIFACT_TOTAL_BYTES_UPLOADED
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.httpArtifactTotalBytesUploaded = iprot.readI64();
struct.setHttpArtifactTotalBytesUploadedIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 22: // HTTP_ARTIFACT_UPLOAD_SCHEDULED_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.httpArtifactUploadScheduledCount = iprot.readI32();
struct.setHttpArtifactUploadScheduledCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 23: // HTTP_ARTIFACT_UPLOAD_STARTED_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.httpArtifactUploadStartedCount = iprot.readI32();
struct.setHttpArtifactUploadStartedCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 24: // HTTP_ARTIFACT_UPLOAD_SUCCESS_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.httpArtifactUploadSuccessCount = iprot.readI32();
struct.setHttpArtifactUploadSuccessCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 25: // HTTP_ARTIFACT_UPLOAD_FAILURE_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.httpArtifactUploadFailureCount = iprot.readI32();
struct.setHttpArtifactUploadFailureCountIsSet(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();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, BuildSlaveStatus struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.stampedeId != null) {
if (struct.isSetStampedeId()) {
oprot.writeFieldBegin(STAMPEDE_ID_FIELD_DESC);
struct.stampedeId.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.runId != null) {
if (struct.isSetRunId()) {
oprot.writeFieldBegin(RUN_ID_FIELD_DESC);
struct.runId.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.isSetTotalRulesCount()) {
oprot.writeFieldBegin(TOTAL_RULES_COUNT_FIELD_DESC);
oprot.writeI32(struct.totalRulesCount);
oprot.writeFieldEnd();
}
if (struct.isSetRulesStartedCount()) {
oprot.writeFieldBegin(RULES_STARTED_COUNT_FIELD_DESC);
oprot.writeI32(struct.rulesStartedCount);
oprot.writeFieldEnd();
}
if (struct.isSetRulesFinishedCount()) {
oprot.writeFieldBegin(RULES_FINISHED_COUNT_FIELD_DESC);
oprot.writeI32(struct.rulesFinishedCount);
oprot.writeFieldEnd();
}
if (struct.isSetRulesSuccessCount()) {
oprot.writeFieldBegin(RULES_SUCCESS_COUNT_FIELD_DESC);
oprot.writeI32(struct.rulesSuccessCount);
oprot.writeFieldEnd();
}
if (struct.isSetRulesFailureCount()) {
oprot.writeFieldBegin(RULES_FAILURE_COUNT_FIELD_DESC);
oprot.writeI32(struct.rulesFailureCount);
oprot.writeFieldEnd();
}
if (struct.cacheRateStats != null) {
if (struct.isSetCacheRateStats()) {
oprot.writeFieldBegin(CACHE_RATE_STATS_FIELD_DESC);
struct.cacheRateStats.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.isSetHttpArtifactTotalBytesUploaded()) {
oprot.writeFieldBegin(HTTP_ARTIFACT_TOTAL_BYTES_UPLOADED_FIELD_DESC);
oprot.writeI64(struct.httpArtifactTotalBytesUploaded);
oprot.writeFieldEnd();
}
if (struct.isSetHttpArtifactUploadScheduledCount()) {
oprot.writeFieldBegin(HTTP_ARTIFACT_UPLOAD_SCHEDULED_COUNT_FIELD_DESC);
oprot.writeI32(struct.httpArtifactUploadScheduledCount);
oprot.writeFieldEnd();
}
if (struct.isSetHttpArtifactUploadStartedCount()) {
oprot.writeFieldBegin(HTTP_ARTIFACT_UPLOAD_STARTED_COUNT_FIELD_DESC);
oprot.writeI32(struct.httpArtifactUploadStartedCount);
oprot.writeFieldEnd();
}
if (struct.isSetHttpArtifactUploadSuccessCount()) {
oprot.writeFieldBegin(HTTP_ARTIFACT_UPLOAD_SUCCESS_COUNT_FIELD_DESC);
oprot.writeI32(struct.httpArtifactUploadSuccessCount);
oprot.writeFieldEnd();
}
if (struct.isSetHttpArtifactUploadFailureCount()) {
oprot.writeFieldBegin(HTTP_ARTIFACT_UPLOAD_FAILURE_COUNT_FIELD_DESC);
oprot.writeI32(struct.httpArtifactUploadFailureCount);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class BuildSlaveStatusTupleSchemeFactory implements SchemeFactory {
public BuildSlaveStatusTupleScheme getScheme() {
return new BuildSlaveStatusTupleScheme();
}
}
private static class BuildSlaveStatusTupleScheme extends TupleScheme<BuildSlaveStatus> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, BuildSlaveStatus struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetStampedeId()) {
optionals.set(0);
}
if (struct.isSetRunId()) {
optionals.set(1);
}
if (struct.isSetTotalRulesCount()) {
optionals.set(2);
}
if (struct.isSetRulesStartedCount()) {
optionals.set(3);
}
if (struct.isSetRulesFinishedCount()) {
optionals.set(4);
}
if (struct.isSetRulesSuccessCount()) {
optionals.set(5);
}
if (struct.isSetRulesFailureCount()) {
optionals.set(6);
}
if (struct.isSetCacheRateStats()) {
optionals.set(7);
}
if (struct.isSetHttpArtifactTotalBytesUploaded()) {
optionals.set(8);
}
if (struct.isSetHttpArtifactUploadScheduledCount()) {
optionals.set(9);
}
if (struct.isSetHttpArtifactUploadStartedCount()) {
optionals.set(10);
}
if (struct.isSetHttpArtifactUploadSuccessCount()) {
optionals.set(11);
}
if (struct.isSetHttpArtifactUploadFailureCount()) {
optionals.set(12);
}
oprot.writeBitSet(optionals, 13);
if (struct.isSetStampedeId()) {
struct.stampedeId.write(oprot);
}
if (struct.isSetRunId()) {
struct.runId.write(oprot);
}
if (struct.isSetTotalRulesCount()) {
oprot.writeI32(struct.totalRulesCount);
}
if (struct.isSetRulesStartedCount()) {
oprot.writeI32(struct.rulesStartedCount);
}
if (struct.isSetRulesFinishedCount()) {
oprot.writeI32(struct.rulesFinishedCount);
}
if (struct.isSetRulesSuccessCount()) {
oprot.writeI32(struct.rulesSuccessCount);
}
if (struct.isSetRulesFailureCount()) {
oprot.writeI32(struct.rulesFailureCount);
}
if (struct.isSetCacheRateStats()) {
struct.cacheRateStats.write(oprot);
}
if (struct.isSetHttpArtifactTotalBytesUploaded()) {
oprot.writeI64(struct.httpArtifactTotalBytesUploaded);
}
if (struct.isSetHttpArtifactUploadScheduledCount()) {
oprot.writeI32(struct.httpArtifactUploadScheduledCount);
}
if (struct.isSetHttpArtifactUploadStartedCount()) {
oprot.writeI32(struct.httpArtifactUploadStartedCount);
}
if (struct.isSetHttpArtifactUploadSuccessCount()) {
oprot.writeI32(struct.httpArtifactUploadSuccessCount);
}
if (struct.isSetHttpArtifactUploadFailureCount()) {
oprot.writeI32(struct.httpArtifactUploadFailureCount);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, BuildSlaveStatus struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(13);
if (incoming.get(0)) {
struct.stampedeId = new com.facebook.buck.distributed.thrift.StampedeId();
struct.stampedeId.read(iprot);
struct.setStampedeIdIsSet(true);
}
if (incoming.get(1)) {
struct.runId = new com.facebook.buck.distributed.thrift.RunId();
struct.runId.read(iprot);
struct.setRunIdIsSet(true);
}
if (incoming.get(2)) {
struct.totalRulesCount = iprot.readI32();
struct.setTotalRulesCountIsSet(true);
}
if (incoming.get(3)) {
struct.rulesStartedCount = iprot.readI32();
struct.setRulesStartedCountIsSet(true);
}
if (incoming.get(4)) {
struct.rulesFinishedCount = iprot.readI32();
struct.setRulesFinishedCountIsSet(true);
}
if (incoming.get(5)) {
struct.rulesSuccessCount = iprot.readI32();
struct.setRulesSuccessCountIsSet(true);
}
if (incoming.get(6)) {
struct.rulesFailureCount = iprot.readI32();
struct.setRulesFailureCountIsSet(true);
}
if (incoming.get(7)) {
struct.cacheRateStats = new CacheRateStats();
struct.cacheRateStats.read(iprot);
struct.setCacheRateStatsIsSet(true);
}
if (incoming.get(8)) {
struct.httpArtifactTotalBytesUploaded = iprot.readI64();
struct.setHttpArtifactTotalBytesUploadedIsSet(true);
}
if (incoming.get(9)) {
struct.httpArtifactUploadScheduledCount = iprot.readI32();
struct.setHttpArtifactUploadScheduledCountIsSet(true);
}
if (incoming.get(10)) {
struct.httpArtifactUploadStartedCount = iprot.readI32();
struct.setHttpArtifactUploadStartedCountIsSet(true);
}
if (incoming.get(11)) {
struct.httpArtifactUploadSuccessCount = iprot.readI32();
struct.setHttpArtifactUploadSuccessCountIsSet(true);
}
if (incoming.get(12)) {
struct.httpArtifactUploadFailureCount = iprot.readI32();
struct.setHttpArtifactUploadFailureCountIsSet(true);
}
}
}
}