/**
* 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.log.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 org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
public class ProcessStatsRemoteLogEntry implements org.apache.thrift.TBase<ProcessStatsRemoteLogEntry, ProcessStatsRemoteLogEntry._Fields>, java.io.Serializable, Cloneable, Comparable<ProcessStatsRemoteLogEntry> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProcessStatsRemoteLogEntry");
private static final org.apache.thrift.protocol.TField EXECUTABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("executable", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField MEM_SIZE_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("memSizeBytes", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField MEM_RESIDENT_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("memResidentBytes", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField CPU_REAL_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("cpuRealMs", org.apache.thrift.protocol.TType.I64, (short)4);
private static final org.apache.thrift.protocol.TField CPU_USER_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("cpuUserMs", org.apache.thrift.protocol.TType.I64, (short)5);
private static final org.apache.thrift.protocol.TField CPU_SYS_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("cpuSysMs", org.apache.thrift.protocol.TType.I64, (short)6);
private static final org.apache.thrift.protocol.TField IO_BYTES_READ_FIELD_DESC = new org.apache.thrift.protocol.TField("ioBytesRead", org.apache.thrift.protocol.TType.I64, (short)7);
private static final org.apache.thrift.protocol.TField IO_BYTES_WRITTEN_FIELD_DESC = new org.apache.thrift.protocol.TField("ioBytesWritten", org.apache.thrift.protocol.TType.I64, (short)8);
private static final org.apache.thrift.protocol.TField CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("context", org.apache.thrift.protocol.TType.MAP, (short)9);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new ProcessStatsRemoteLogEntryStandardSchemeFactory());
schemes.put(TupleScheme.class, new ProcessStatsRemoteLogEntryTupleSchemeFactory());
}
public String executable; // optional
public long memSizeBytes; // optional
public long memResidentBytes; // optional
public long cpuRealMs; // optional
public long cpuUserMs; // optional
public long cpuSysMs; // optional
public long ioBytesRead; // optional
public long ioBytesWritten; // optional
public Map<String,String> context; // 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 {
EXECUTABLE((short)1, "executable"),
MEM_SIZE_BYTES((short)2, "memSizeBytes"),
MEM_RESIDENT_BYTES((short)3, "memResidentBytes"),
CPU_REAL_MS((short)4, "cpuRealMs"),
CPU_USER_MS((short)5, "cpuUserMs"),
CPU_SYS_MS((short)6, "cpuSysMs"),
IO_BYTES_READ((short)7, "ioBytesRead"),
IO_BYTES_WRITTEN((short)8, "ioBytesWritten"),
CONTEXT((short)9, "context");
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: // EXECUTABLE
return EXECUTABLE;
case 2: // MEM_SIZE_BYTES
return MEM_SIZE_BYTES;
case 3: // MEM_RESIDENT_BYTES
return MEM_RESIDENT_BYTES;
case 4: // CPU_REAL_MS
return CPU_REAL_MS;
case 5: // CPU_USER_MS
return CPU_USER_MS;
case 6: // CPU_SYS_MS
return CPU_SYS_MS;
case 7: // IO_BYTES_READ
return IO_BYTES_READ;
case 8: // IO_BYTES_WRITTEN
return IO_BYTES_WRITTEN;
case 9: // CONTEXT
return CONTEXT;
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 __MEMSIZEBYTES_ISSET_ID = 0;
private static final int __MEMRESIDENTBYTES_ISSET_ID = 1;
private static final int __CPUREALMS_ISSET_ID = 2;
private static final int __CPUUSERMS_ISSET_ID = 3;
private static final int __CPUSYSMS_ISSET_ID = 4;
private static final int __IOBYTESREAD_ISSET_ID = 5;
private static final int __IOBYTESWRITTEN_ISSET_ID = 6;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.EXECUTABLE,_Fields.MEM_SIZE_BYTES,_Fields.MEM_RESIDENT_BYTES,_Fields.CPU_REAL_MS,_Fields.CPU_USER_MS,_Fields.CPU_SYS_MS,_Fields.IO_BYTES_READ,_Fields.IO_BYTES_WRITTEN,_Fields.CONTEXT};
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.EXECUTABLE, new org.apache.thrift.meta_data.FieldMetaData("executable", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.MEM_SIZE_BYTES, new org.apache.thrift.meta_data.FieldMetaData("memSizeBytes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.MEM_RESIDENT_BYTES, new org.apache.thrift.meta_data.FieldMetaData("memResidentBytes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.CPU_REAL_MS, new org.apache.thrift.meta_data.FieldMetaData("cpuRealMs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.CPU_USER_MS, new org.apache.thrift.meta_data.FieldMetaData("cpuUserMs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.CPU_SYS_MS, new org.apache.thrift.meta_data.FieldMetaData("cpuSysMs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.IO_BYTES_READ, new org.apache.thrift.meta_data.FieldMetaData("ioBytesRead", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.IO_BYTES_WRITTEN, new org.apache.thrift.meta_data.FieldMetaData("ioBytesWritten", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("context", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ProcessStatsRemoteLogEntry.class, metaDataMap);
}
public ProcessStatsRemoteLogEntry() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public ProcessStatsRemoteLogEntry(ProcessStatsRemoteLogEntry other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetExecutable()) {
this.executable = other.executable;
}
this.memSizeBytes = other.memSizeBytes;
this.memResidentBytes = other.memResidentBytes;
this.cpuRealMs = other.cpuRealMs;
this.cpuUserMs = other.cpuUserMs;
this.cpuSysMs = other.cpuSysMs;
this.ioBytesRead = other.ioBytesRead;
this.ioBytesWritten = other.ioBytesWritten;
if (other.isSetContext()) {
Map<String,String> __this__context = new HashMap<String,String>(other.context);
this.context = __this__context;
}
}
public ProcessStatsRemoteLogEntry deepCopy() {
return new ProcessStatsRemoteLogEntry(this);
}
@Override
public void clear() {
this.executable = null;
setMemSizeBytesIsSet(false);
this.memSizeBytes = 0;
setMemResidentBytesIsSet(false);
this.memResidentBytes = 0;
setCpuRealMsIsSet(false);
this.cpuRealMs = 0;
setCpuUserMsIsSet(false);
this.cpuUserMs = 0;
setCpuSysMsIsSet(false);
this.cpuSysMs = 0;
setIoBytesReadIsSet(false);
this.ioBytesRead = 0;
setIoBytesWrittenIsSet(false);
this.ioBytesWritten = 0;
this.context = null;
}
public String getExecutable() {
return this.executable;
}
public ProcessStatsRemoteLogEntry setExecutable(String executable) {
this.executable = executable;
return this;
}
public void unsetExecutable() {
this.executable = null;
}
/** Returns true if field executable is set (has been assigned a value) and false otherwise */
public boolean isSetExecutable() {
return this.executable != null;
}
public void setExecutableIsSet(boolean value) {
if (!value) {
this.executable = null;
}
}
public long getMemSizeBytes() {
return this.memSizeBytes;
}
public ProcessStatsRemoteLogEntry setMemSizeBytes(long memSizeBytes) {
this.memSizeBytes = memSizeBytes;
setMemSizeBytesIsSet(true);
return this;
}
public void unsetMemSizeBytes() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MEMSIZEBYTES_ISSET_ID);
}
/** Returns true if field memSizeBytes is set (has been assigned a value) and false otherwise */
public boolean isSetMemSizeBytes() {
return EncodingUtils.testBit(__isset_bitfield, __MEMSIZEBYTES_ISSET_ID);
}
public void setMemSizeBytesIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MEMSIZEBYTES_ISSET_ID, value);
}
public long getMemResidentBytes() {
return this.memResidentBytes;
}
public ProcessStatsRemoteLogEntry setMemResidentBytes(long memResidentBytes) {
this.memResidentBytes = memResidentBytes;
setMemResidentBytesIsSet(true);
return this;
}
public void unsetMemResidentBytes() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MEMRESIDENTBYTES_ISSET_ID);
}
/** Returns true if field memResidentBytes is set (has been assigned a value) and false otherwise */
public boolean isSetMemResidentBytes() {
return EncodingUtils.testBit(__isset_bitfield, __MEMRESIDENTBYTES_ISSET_ID);
}
public void setMemResidentBytesIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MEMRESIDENTBYTES_ISSET_ID, value);
}
public long getCpuRealMs() {
return this.cpuRealMs;
}
public ProcessStatsRemoteLogEntry setCpuRealMs(long cpuRealMs) {
this.cpuRealMs = cpuRealMs;
setCpuRealMsIsSet(true);
return this;
}
public void unsetCpuRealMs() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CPUREALMS_ISSET_ID);
}
/** Returns true if field cpuRealMs is set (has been assigned a value) and false otherwise */
public boolean isSetCpuRealMs() {
return EncodingUtils.testBit(__isset_bitfield, __CPUREALMS_ISSET_ID);
}
public void setCpuRealMsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPUREALMS_ISSET_ID, value);
}
public long getCpuUserMs() {
return this.cpuUserMs;
}
public ProcessStatsRemoteLogEntry setCpuUserMs(long cpuUserMs) {
this.cpuUserMs = cpuUserMs;
setCpuUserMsIsSet(true);
return this;
}
public void unsetCpuUserMs() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CPUUSERMS_ISSET_ID);
}
/** Returns true if field cpuUserMs is set (has been assigned a value) and false otherwise */
public boolean isSetCpuUserMs() {
return EncodingUtils.testBit(__isset_bitfield, __CPUUSERMS_ISSET_ID);
}
public void setCpuUserMsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPUUSERMS_ISSET_ID, value);
}
public long getCpuSysMs() {
return this.cpuSysMs;
}
public ProcessStatsRemoteLogEntry setCpuSysMs(long cpuSysMs) {
this.cpuSysMs = cpuSysMs;
setCpuSysMsIsSet(true);
return this;
}
public void unsetCpuSysMs() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CPUSYSMS_ISSET_ID);
}
/** Returns true if field cpuSysMs is set (has been assigned a value) and false otherwise */
public boolean isSetCpuSysMs() {
return EncodingUtils.testBit(__isset_bitfield, __CPUSYSMS_ISSET_ID);
}
public void setCpuSysMsIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CPUSYSMS_ISSET_ID, value);
}
public long getIoBytesRead() {
return this.ioBytesRead;
}
public ProcessStatsRemoteLogEntry setIoBytesRead(long ioBytesRead) {
this.ioBytesRead = ioBytesRead;
setIoBytesReadIsSet(true);
return this;
}
public void unsetIoBytesRead() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IOBYTESREAD_ISSET_ID);
}
/** Returns true if field ioBytesRead is set (has been assigned a value) and false otherwise */
public boolean isSetIoBytesRead() {
return EncodingUtils.testBit(__isset_bitfield, __IOBYTESREAD_ISSET_ID);
}
public void setIoBytesReadIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IOBYTESREAD_ISSET_ID, value);
}
public long getIoBytesWritten() {
return this.ioBytesWritten;
}
public ProcessStatsRemoteLogEntry setIoBytesWritten(long ioBytesWritten) {
this.ioBytesWritten = ioBytesWritten;
setIoBytesWrittenIsSet(true);
return this;
}
public void unsetIoBytesWritten() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IOBYTESWRITTEN_ISSET_ID);
}
/** Returns true if field ioBytesWritten is set (has been assigned a value) and false otherwise */
public boolean isSetIoBytesWritten() {
return EncodingUtils.testBit(__isset_bitfield, __IOBYTESWRITTEN_ISSET_ID);
}
public void setIoBytesWrittenIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IOBYTESWRITTEN_ISSET_ID, value);
}
public int getContextSize() {
return (this.context == null) ? 0 : this.context.size();
}
public void putToContext(String key, String val) {
if (this.context == null) {
this.context = new HashMap<String,String>();
}
this.context.put(key, val);
}
public Map<String,String> getContext() {
return this.context;
}
public ProcessStatsRemoteLogEntry setContext(Map<String,String> context) {
this.context = context;
return this;
}
public void unsetContext() {
this.context = null;
}
/** Returns true if field context is set (has been assigned a value) and false otherwise */
public boolean isSetContext() {
return this.context != null;
}
public void setContextIsSet(boolean value) {
if (!value) {
this.context = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case EXECUTABLE:
if (value == null) {
unsetExecutable();
} else {
setExecutable((String)value);
}
break;
case MEM_SIZE_BYTES:
if (value == null) {
unsetMemSizeBytes();
} else {
setMemSizeBytes((Long)value);
}
break;
case MEM_RESIDENT_BYTES:
if (value == null) {
unsetMemResidentBytes();
} else {
setMemResidentBytes((Long)value);
}
break;
case CPU_REAL_MS:
if (value == null) {
unsetCpuRealMs();
} else {
setCpuRealMs((Long)value);
}
break;
case CPU_USER_MS:
if (value == null) {
unsetCpuUserMs();
} else {
setCpuUserMs((Long)value);
}
break;
case CPU_SYS_MS:
if (value == null) {
unsetCpuSysMs();
} else {
setCpuSysMs((Long)value);
}
break;
case IO_BYTES_READ:
if (value == null) {
unsetIoBytesRead();
} else {
setIoBytesRead((Long)value);
}
break;
case IO_BYTES_WRITTEN:
if (value == null) {
unsetIoBytesWritten();
} else {
setIoBytesWritten((Long)value);
}
break;
case CONTEXT:
if (value == null) {
unsetContext();
} else {
setContext((Map<String,String>)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case EXECUTABLE:
return getExecutable();
case MEM_SIZE_BYTES:
return getMemSizeBytes();
case MEM_RESIDENT_BYTES:
return getMemResidentBytes();
case CPU_REAL_MS:
return getCpuRealMs();
case CPU_USER_MS:
return getCpuUserMs();
case CPU_SYS_MS:
return getCpuSysMs();
case IO_BYTES_READ:
return getIoBytesRead();
case IO_BYTES_WRITTEN:
return getIoBytesWritten();
case CONTEXT:
return getContext();
}
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 EXECUTABLE:
return isSetExecutable();
case MEM_SIZE_BYTES:
return isSetMemSizeBytes();
case MEM_RESIDENT_BYTES:
return isSetMemResidentBytes();
case CPU_REAL_MS:
return isSetCpuRealMs();
case CPU_USER_MS:
return isSetCpuUserMs();
case CPU_SYS_MS:
return isSetCpuSysMs();
case IO_BYTES_READ:
return isSetIoBytesRead();
case IO_BYTES_WRITTEN:
return isSetIoBytesWritten();
case CONTEXT:
return isSetContext();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof ProcessStatsRemoteLogEntry)
return this.equals((ProcessStatsRemoteLogEntry)that);
return false;
}
public boolean equals(ProcessStatsRemoteLogEntry that) {
if (that == null)
return false;
boolean this_present_executable = true && this.isSetExecutable();
boolean that_present_executable = true && that.isSetExecutable();
if (this_present_executable || that_present_executable) {
if (!(this_present_executable && that_present_executable))
return false;
if (!this.executable.equals(that.executable))
return false;
}
boolean this_present_memSizeBytes = true && this.isSetMemSizeBytes();
boolean that_present_memSizeBytes = true && that.isSetMemSizeBytes();
if (this_present_memSizeBytes || that_present_memSizeBytes) {
if (!(this_present_memSizeBytes && that_present_memSizeBytes))
return false;
if (this.memSizeBytes != that.memSizeBytes)
return false;
}
boolean this_present_memResidentBytes = true && this.isSetMemResidentBytes();
boolean that_present_memResidentBytes = true && that.isSetMemResidentBytes();
if (this_present_memResidentBytes || that_present_memResidentBytes) {
if (!(this_present_memResidentBytes && that_present_memResidentBytes))
return false;
if (this.memResidentBytes != that.memResidentBytes)
return false;
}
boolean this_present_cpuRealMs = true && this.isSetCpuRealMs();
boolean that_present_cpuRealMs = true && that.isSetCpuRealMs();
if (this_present_cpuRealMs || that_present_cpuRealMs) {
if (!(this_present_cpuRealMs && that_present_cpuRealMs))
return false;
if (this.cpuRealMs != that.cpuRealMs)
return false;
}
boolean this_present_cpuUserMs = true && this.isSetCpuUserMs();
boolean that_present_cpuUserMs = true && that.isSetCpuUserMs();
if (this_present_cpuUserMs || that_present_cpuUserMs) {
if (!(this_present_cpuUserMs && that_present_cpuUserMs))
return false;
if (this.cpuUserMs != that.cpuUserMs)
return false;
}
boolean this_present_cpuSysMs = true && this.isSetCpuSysMs();
boolean that_present_cpuSysMs = true && that.isSetCpuSysMs();
if (this_present_cpuSysMs || that_present_cpuSysMs) {
if (!(this_present_cpuSysMs && that_present_cpuSysMs))
return false;
if (this.cpuSysMs != that.cpuSysMs)
return false;
}
boolean this_present_ioBytesRead = true && this.isSetIoBytesRead();
boolean that_present_ioBytesRead = true && that.isSetIoBytesRead();
if (this_present_ioBytesRead || that_present_ioBytesRead) {
if (!(this_present_ioBytesRead && that_present_ioBytesRead))
return false;
if (this.ioBytesRead != that.ioBytesRead)
return false;
}
boolean this_present_ioBytesWritten = true && this.isSetIoBytesWritten();
boolean that_present_ioBytesWritten = true && that.isSetIoBytesWritten();
if (this_present_ioBytesWritten || that_present_ioBytesWritten) {
if (!(this_present_ioBytesWritten && that_present_ioBytesWritten))
return false;
if (this.ioBytesWritten != that.ioBytesWritten)
return false;
}
boolean this_present_context = true && this.isSetContext();
boolean that_present_context = true && that.isSetContext();
if (this_present_context || that_present_context) {
if (!(this_present_context && that_present_context))
return false;
if (!this.context.equals(that.context))
return false;
}
return true;
}
@Override
public int hashCode() {
List<Object> list = new ArrayList<Object>();
boolean present_executable = true && (isSetExecutable());
list.add(present_executable);
if (present_executable)
list.add(executable);
boolean present_memSizeBytes = true && (isSetMemSizeBytes());
list.add(present_memSizeBytes);
if (present_memSizeBytes)
list.add(memSizeBytes);
boolean present_memResidentBytes = true && (isSetMemResidentBytes());
list.add(present_memResidentBytes);
if (present_memResidentBytes)
list.add(memResidentBytes);
boolean present_cpuRealMs = true && (isSetCpuRealMs());
list.add(present_cpuRealMs);
if (present_cpuRealMs)
list.add(cpuRealMs);
boolean present_cpuUserMs = true && (isSetCpuUserMs());
list.add(present_cpuUserMs);
if (present_cpuUserMs)
list.add(cpuUserMs);
boolean present_cpuSysMs = true && (isSetCpuSysMs());
list.add(present_cpuSysMs);
if (present_cpuSysMs)
list.add(cpuSysMs);
boolean present_ioBytesRead = true && (isSetIoBytesRead());
list.add(present_ioBytesRead);
if (present_ioBytesRead)
list.add(ioBytesRead);
boolean present_ioBytesWritten = true && (isSetIoBytesWritten());
list.add(present_ioBytesWritten);
if (present_ioBytesWritten)
list.add(ioBytesWritten);
boolean present_context = true && (isSetContext());
list.add(present_context);
if (present_context)
list.add(context);
return list.hashCode();
}
@Override
public int compareTo(ProcessStatsRemoteLogEntry other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetExecutable()).compareTo(other.isSetExecutable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExecutable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executable, other.executable);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMemSizeBytes()).compareTo(other.isSetMemSizeBytes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMemSizeBytes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.memSizeBytes, other.memSizeBytes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMemResidentBytes()).compareTo(other.isSetMemResidentBytes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMemResidentBytes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.memResidentBytes, other.memResidentBytes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCpuRealMs()).compareTo(other.isSetCpuRealMs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCpuRealMs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cpuRealMs, other.cpuRealMs);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCpuUserMs()).compareTo(other.isSetCpuUserMs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCpuUserMs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cpuUserMs, other.cpuUserMs);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetCpuSysMs()).compareTo(other.isSetCpuSysMs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCpuSysMs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cpuSysMs, other.cpuSysMs);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIoBytesRead()).compareTo(other.isSetIoBytesRead());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIoBytesRead()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ioBytesRead, other.ioBytesRead);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIoBytesWritten()).compareTo(other.isSetIoBytesWritten());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIoBytesWritten()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ioBytesWritten, other.ioBytesWritten);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetContext()).compareTo(other.isSetContext());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetContext()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.context, other.context);
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("ProcessStatsRemoteLogEntry(");
boolean first = true;
if (isSetExecutable()) {
sb.append("executable:");
if (this.executable == null) {
sb.append("null");
} else {
sb.append(this.executable);
}
first = false;
}
if (isSetMemSizeBytes()) {
if (!first) sb.append(", ");
sb.append("memSizeBytes:");
sb.append(this.memSizeBytes);
first = false;
}
if (isSetMemResidentBytes()) {
if (!first) sb.append(", ");
sb.append("memResidentBytes:");
sb.append(this.memResidentBytes);
first = false;
}
if (isSetCpuRealMs()) {
if (!first) sb.append(", ");
sb.append("cpuRealMs:");
sb.append(this.cpuRealMs);
first = false;
}
if (isSetCpuUserMs()) {
if (!first) sb.append(", ");
sb.append("cpuUserMs:");
sb.append(this.cpuUserMs);
first = false;
}
if (isSetCpuSysMs()) {
if (!first) sb.append(", ");
sb.append("cpuSysMs:");
sb.append(this.cpuSysMs);
first = false;
}
if (isSetIoBytesRead()) {
if (!first) sb.append(", ");
sb.append("ioBytesRead:");
sb.append(this.ioBytesRead);
first = false;
}
if (isSetIoBytesWritten()) {
if (!first) sb.append(", ");
sb.append("ioBytesWritten:");
sb.append(this.ioBytesWritten);
first = false;
}
if (isSetContext()) {
if (!first) sb.append(", ");
sb.append("context:");
if (this.context == null) {
sb.append("null");
} else {
sb.append(this.context);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// 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, 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 ProcessStatsRemoteLogEntryStandardSchemeFactory implements SchemeFactory {
public ProcessStatsRemoteLogEntryStandardScheme getScheme() {
return new ProcessStatsRemoteLogEntryStandardScheme();
}
}
private static class ProcessStatsRemoteLogEntryStandardScheme extends StandardScheme<ProcessStatsRemoteLogEntry> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ProcessStatsRemoteLogEntry 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: // EXECUTABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.executable = iprot.readString();
struct.setExecutableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // MEM_SIZE_BYTES
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.memSizeBytes = iprot.readI64();
struct.setMemSizeBytesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // MEM_RESIDENT_BYTES
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.memResidentBytes = iprot.readI64();
struct.setMemResidentBytesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // CPU_REAL_MS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.cpuRealMs = iprot.readI64();
struct.setCpuRealMsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // CPU_USER_MS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.cpuUserMs = iprot.readI64();
struct.setCpuUserMsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // CPU_SYS_MS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.cpuSysMs = iprot.readI64();
struct.setCpuSysMsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // IO_BYTES_READ
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.ioBytesRead = iprot.readI64();
struct.setIoBytesReadIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // IO_BYTES_WRITTEN
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.ioBytesWritten = iprot.readI64();
struct.setIoBytesWrittenIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // CONTEXT
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map26 = iprot.readMapBegin();
struct.context = new HashMap<String,String>(2*_map26.size);
String _key27;
String _val28;
for (int _i29 = 0; _i29 < _map26.size; ++_i29)
{
_key27 = iprot.readString();
_val28 = iprot.readString();
struct.context.put(_key27, _val28);
}
iprot.readMapEnd();
}
struct.setContextIsSet(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, ProcessStatsRemoteLogEntry struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.executable != null) {
if (struct.isSetExecutable()) {
oprot.writeFieldBegin(EXECUTABLE_FIELD_DESC);
oprot.writeString(struct.executable);
oprot.writeFieldEnd();
}
}
if (struct.isSetMemSizeBytes()) {
oprot.writeFieldBegin(MEM_SIZE_BYTES_FIELD_DESC);
oprot.writeI64(struct.memSizeBytes);
oprot.writeFieldEnd();
}
if (struct.isSetMemResidentBytes()) {
oprot.writeFieldBegin(MEM_RESIDENT_BYTES_FIELD_DESC);
oprot.writeI64(struct.memResidentBytes);
oprot.writeFieldEnd();
}
if (struct.isSetCpuRealMs()) {
oprot.writeFieldBegin(CPU_REAL_MS_FIELD_DESC);
oprot.writeI64(struct.cpuRealMs);
oprot.writeFieldEnd();
}
if (struct.isSetCpuUserMs()) {
oprot.writeFieldBegin(CPU_USER_MS_FIELD_DESC);
oprot.writeI64(struct.cpuUserMs);
oprot.writeFieldEnd();
}
if (struct.isSetCpuSysMs()) {
oprot.writeFieldBegin(CPU_SYS_MS_FIELD_DESC);
oprot.writeI64(struct.cpuSysMs);
oprot.writeFieldEnd();
}
if (struct.isSetIoBytesRead()) {
oprot.writeFieldBegin(IO_BYTES_READ_FIELD_DESC);
oprot.writeI64(struct.ioBytesRead);
oprot.writeFieldEnd();
}
if (struct.isSetIoBytesWritten()) {
oprot.writeFieldBegin(IO_BYTES_WRITTEN_FIELD_DESC);
oprot.writeI64(struct.ioBytesWritten);
oprot.writeFieldEnd();
}
if (struct.context != null) {
if (struct.isSetContext()) {
oprot.writeFieldBegin(CONTEXT_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.context.size()));
for (Map.Entry<String, String> _iter30 : struct.context.entrySet())
{
oprot.writeString(_iter30.getKey());
oprot.writeString(_iter30.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class ProcessStatsRemoteLogEntryTupleSchemeFactory implements SchemeFactory {
public ProcessStatsRemoteLogEntryTupleScheme getScheme() {
return new ProcessStatsRemoteLogEntryTupleScheme();
}
}
private static class ProcessStatsRemoteLogEntryTupleScheme extends TupleScheme<ProcessStatsRemoteLogEntry> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ProcessStatsRemoteLogEntry struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetExecutable()) {
optionals.set(0);
}
if (struct.isSetMemSizeBytes()) {
optionals.set(1);
}
if (struct.isSetMemResidentBytes()) {
optionals.set(2);
}
if (struct.isSetCpuRealMs()) {
optionals.set(3);
}
if (struct.isSetCpuUserMs()) {
optionals.set(4);
}
if (struct.isSetCpuSysMs()) {
optionals.set(5);
}
if (struct.isSetIoBytesRead()) {
optionals.set(6);
}
if (struct.isSetIoBytesWritten()) {
optionals.set(7);
}
if (struct.isSetContext()) {
optionals.set(8);
}
oprot.writeBitSet(optionals, 9);
if (struct.isSetExecutable()) {
oprot.writeString(struct.executable);
}
if (struct.isSetMemSizeBytes()) {
oprot.writeI64(struct.memSizeBytes);
}
if (struct.isSetMemResidentBytes()) {
oprot.writeI64(struct.memResidentBytes);
}
if (struct.isSetCpuRealMs()) {
oprot.writeI64(struct.cpuRealMs);
}
if (struct.isSetCpuUserMs()) {
oprot.writeI64(struct.cpuUserMs);
}
if (struct.isSetCpuSysMs()) {
oprot.writeI64(struct.cpuSysMs);
}
if (struct.isSetIoBytesRead()) {
oprot.writeI64(struct.ioBytesRead);
}
if (struct.isSetIoBytesWritten()) {
oprot.writeI64(struct.ioBytesWritten);
}
if (struct.isSetContext()) {
{
oprot.writeI32(struct.context.size());
for (Map.Entry<String, String> _iter31 : struct.context.entrySet())
{
oprot.writeString(_iter31.getKey());
oprot.writeString(_iter31.getValue());
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ProcessStatsRemoteLogEntry struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(9);
if (incoming.get(0)) {
struct.executable = iprot.readString();
struct.setExecutableIsSet(true);
}
if (incoming.get(1)) {
struct.memSizeBytes = iprot.readI64();
struct.setMemSizeBytesIsSet(true);
}
if (incoming.get(2)) {
struct.memResidentBytes = iprot.readI64();
struct.setMemResidentBytesIsSet(true);
}
if (incoming.get(3)) {
struct.cpuRealMs = iprot.readI64();
struct.setCpuRealMsIsSet(true);
}
if (incoming.get(4)) {
struct.cpuUserMs = iprot.readI64();
struct.setCpuUserMsIsSet(true);
}
if (incoming.get(5)) {
struct.cpuSysMs = iprot.readI64();
struct.setCpuSysMsIsSet(true);
}
if (incoming.get(6)) {
struct.ioBytesRead = iprot.readI64();
struct.setIoBytesReadIsSet(true);
}
if (incoming.get(7)) {
struct.ioBytesWritten = iprot.readI64();
struct.setIoBytesWrittenIsSet(true);
}
if (incoming.get(8)) {
{
org.apache.thrift.protocol.TMap _map32 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.context = new HashMap<String,String>(2*_map32.size);
String _key33;
String _val34;
for (int _i35 = 0; _i35 < _map32.size; ++_i35)
{
_key33 = iprot.readString();
_val34 = iprot.readString();
struct.context.put(_key33, _val34);
}
}
struct.setContextIsSet(true);
}
}
}
}