/** * Autogenerated by Thrift Compiler (1.0.0-dev) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.liveramp.hank.generated; import org.apache.commons.lang.builder.HashCodeBuilder; 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 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; public class DomainStatisticsSummary implements org.apache.thrift.TBase<DomainStatisticsSummary, DomainStatisticsSummary._Fields>, java.io.Serializable, Cloneable, Comparable<DomainStatisticsSummary> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DomainStatisticsSummary"); private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.protocol.TField THROUGHPUT_TOTAL_FIELD_DESC = new org.apache.thrift.protocol.TField("throughput_total", org.apache.thrift.protocol.TType.DOUBLE, (short)2); private static final org.apache.thrift.protocol.TField RESPONSE_DATA_THROUGHPUT_TOTAL_FIELD_DESC = new org.apache.thrift.protocol.TField("response_data_throughput_total", org.apache.thrift.protocol.TType.DOUBLE, (short)3); private static final org.apache.thrift.protocol.TField NUM_REQUESTS_TOTAL_FIELD_DESC = new org.apache.thrift.protocol.TField("num_requests_total", org.apache.thrift.protocol.TType.I64, (short)4); private static final org.apache.thrift.protocol.TField NUM_HITS_TOTAL_FIELD_DESC = new org.apache.thrift.protocol.TField("num_hits_total", org.apache.thrift.protocol.TType.I64, (short)5); private static final org.apache.thrift.protocol.TField NUM_L1_CACHE_HITS_TOTAL_FIELD_DESC = new org.apache.thrift.protocol.TField("num_l1_cache_hits_total", org.apache.thrift.protocol.TType.I64, (short)6); private static final org.apache.thrift.protocol.TField NUM_L2_CACHE_HITS_TOTAL_FIELD_DESC = new org.apache.thrift.protocol.TField("num_l2_cache_hits_total", org.apache.thrift.protocol.TType.I64, (short)7); private static final org.apache.thrift.protocol.TField CACHE_NUM_ITEMS_FIELD_DESC = new org.apache.thrift.protocol.TField("cache_num_items", org.apache.thrift.protocol.TType.I64, (short)8); private static final org.apache.thrift.protocol.TField CACHE_MAX_NUM_ITEMS_FIELD_DESC = new org.apache.thrift.protocol.TField("cache_max_num_items", org.apache.thrift.protocol.TType.I64, (short)9); private static final org.apache.thrift.protocol.TField CACHE_NUM_MANAGED_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("cache_num_managed_bytes", org.apache.thrift.protocol.TType.I64, (short)10); private static final org.apache.thrift.protocol.TField CACHE_MAX_NUM_MANAGED_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("cache_max_num_managed_bytes", org.apache.thrift.protocol.TType.I64, (short)11); private static final org.apache.thrift.protocol.TField LATENCY_SUMMARY_FIELD_DESC = new org.apache.thrift.protocol.TField("latency_summary", org.apache.thrift.protocol.TType.STRUCT, (short)12); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new DomainStatisticsSummaryStandardSchemeFactory()); schemes.put(TupleScheme.class, new DomainStatisticsSummaryTupleSchemeFactory()); } public int id; // required public double throughput_total; // required public double response_data_throughput_total; // required public long num_requests_total; // required public long num_hits_total; // required public long num_l1_cache_hits_total; // required public long num_l2_cache_hits_total; // required public long cache_num_items; // required public long cache_max_num_items; // required public long cache_num_managed_bytes; // required public long cache_max_num_managed_bytes; // required public LatencySampleSummary latency_summary; // 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 { ID((short)1, "id"), THROUGHPUT_TOTAL((short)2, "throughput_total"), RESPONSE_DATA_THROUGHPUT_TOTAL((short)3, "response_data_throughput_total"), NUM_REQUESTS_TOTAL((short)4, "num_requests_total"), NUM_HITS_TOTAL((short)5, "num_hits_total"), NUM_L1_CACHE_HITS_TOTAL((short)6, "num_l1_cache_hits_total"), NUM_L2_CACHE_HITS_TOTAL((short)7, "num_l2_cache_hits_total"), CACHE_NUM_ITEMS((short)8, "cache_num_items"), CACHE_MAX_NUM_ITEMS((short)9, "cache_max_num_items"), CACHE_NUM_MANAGED_BYTES((short)10, "cache_num_managed_bytes"), CACHE_MAX_NUM_MANAGED_BYTES((short)11, "cache_max_num_managed_bytes"), LATENCY_SUMMARY((short)12, "latency_summary"); 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: // ID return ID; case 2: // THROUGHPUT_TOTAL return THROUGHPUT_TOTAL; case 3: // RESPONSE_DATA_THROUGHPUT_TOTAL return RESPONSE_DATA_THROUGHPUT_TOTAL; case 4: // NUM_REQUESTS_TOTAL return NUM_REQUESTS_TOTAL; case 5: // NUM_HITS_TOTAL return NUM_HITS_TOTAL; case 6: // NUM_L1_CACHE_HITS_TOTAL return NUM_L1_CACHE_HITS_TOTAL; case 7: // NUM_L2_CACHE_HITS_TOTAL return NUM_L2_CACHE_HITS_TOTAL; case 8: // CACHE_NUM_ITEMS return CACHE_NUM_ITEMS; case 9: // CACHE_MAX_NUM_ITEMS return CACHE_MAX_NUM_ITEMS; case 10: // CACHE_NUM_MANAGED_BYTES return CACHE_NUM_MANAGED_BYTES; case 11: // CACHE_MAX_NUM_MANAGED_BYTES return CACHE_MAX_NUM_MANAGED_BYTES; case 12: // LATENCY_SUMMARY return LATENCY_SUMMARY; 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 __ID_ISSET_ID = 0; private static final int __THROUGHPUT_TOTAL_ISSET_ID = 1; private static final int __RESPONSE_DATA_THROUGHPUT_TOTAL_ISSET_ID = 2; private static final int __NUM_REQUESTS_TOTAL_ISSET_ID = 3; private static final int __NUM_HITS_TOTAL_ISSET_ID = 4; private static final int __NUM_L1_CACHE_HITS_TOTAL_ISSET_ID = 5; private static final int __NUM_L2_CACHE_HITS_TOTAL_ISSET_ID = 6; private static final int __CACHE_NUM_ITEMS_ISSET_ID = 7; private static final int __CACHE_MAX_NUM_ITEMS_ISSET_ID = 8; private static final int __CACHE_NUM_MANAGED_BYTES_ISSET_ID = 9; private static final int __CACHE_MAX_NUM_MANAGED_BYTES_ISSET_ID = 10; private short __isset_bitfield = 0; private _Fields optionals[] = {_Fields.LATENCY_SUMMARY}; 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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.THROUGHPUT_TOTAL, new org.apache.thrift.meta_data.FieldMetaData("throughput_total", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.RESPONSE_DATA_THROUGHPUT_TOTAL, new org.apache.thrift.meta_data.FieldMetaData("response_data_throughput_total", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.NUM_REQUESTS_TOTAL, new org.apache.thrift.meta_data.FieldMetaData("num_requests_total", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.NUM_HITS_TOTAL, new org.apache.thrift.meta_data.FieldMetaData("num_hits_total", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.NUM_L1_CACHE_HITS_TOTAL, new org.apache.thrift.meta_data.FieldMetaData("num_l1_cache_hits_total", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.NUM_L2_CACHE_HITS_TOTAL, new org.apache.thrift.meta_data.FieldMetaData("num_l2_cache_hits_total", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.CACHE_NUM_ITEMS, new org.apache.thrift.meta_data.FieldMetaData("cache_num_items", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.CACHE_MAX_NUM_ITEMS, new org.apache.thrift.meta_data.FieldMetaData("cache_max_num_items", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.CACHE_NUM_MANAGED_BYTES, new org.apache.thrift.meta_data.FieldMetaData("cache_num_managed_bytes", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.CACHE_MAX_NUM_MANAGED_BYTES, new org.apache.thrift.meta_data.FieldMetaData("cache_max_num_managed_bytes", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.LATENCY_SUMMARY, new org.apache.thrift.meta_data.FieldMetaData("latency_summary", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LatencySampleSummary.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DomainStatisticsSummary.class, metaDataMap); } public DomainStatisticsSummary() { } public DomainStatisticsSummary( int id, double throughput_total, double response_data_throughput_total, long num_requests_total, long num_hits_total, long num_l1_cache_hits_total, long num_l2_cache_hits_total, long cache_num_items, long cache_max_num_items, long cache_num_managed_bytes, long cache_max_num_managed_bytes) { this(); this.id = id; set_id_isSet(true); this.throughput_total = throughput_total; set_throughput_total_isSet(true); this.response_data_throughput_total = response_data_throughput_total; set_response_data_throughput_total_isSet(true); this.num_requests_total = num_requests_total; set_num_requests_total_isSet(true); this.num_hits_total = num_hits_total; set_num_hits_total_isSet(true); this.num_l1_cache_hits_total = num_l1_cache_hits_total; set_num_l1_cache_hits_total_isSet(true); this.num_l2_cache_hits_total = num_l2_cache_hits_total; set_num_l2_cache_hits_total_isSet(true); this.cache_num_items = cache_num_items; set_cache_num_items_isSet(true); this.cache_max_num_items = cache_max_num_items; set_cache_max_num_items_isSet(true); this.cache_num_managed_bytes = cache_num_managed_bytes; set_cache_num_managed_bytes_isSet(true); this.cache_max_num_managed_bytes = cache_max_num_managed_bytes; set_cache_max_num_managed_bytes_isSet(true); } /** * Performs a deep copy on <i>other</i>. */ public DomainStatisticsSummary(DomainStatisticsSummary other) { __isset_bitfield = other.__isset_bitfield; this.id = other.id; this.throughput_total = other.throughput_total; this.response_data_throughput_total = other.response_data_throughput_total; this.num_requests_total = other.num_requests_total; this.num_hits_total = other.num_hits_total; this.num_l1_cache_hits_total = other.num_l1_cache_hits_total; this.num_l2_cache_hits_total = other.num_l2_cache_hits_total; this.cache_num_items = other.cache_num_items; this.cache_max_num_items = other.cache_max_num_items; this.cache_num_managed_bytes = other.cache_num_managed_bytes; this.cache_max_num_managed_bytes = other.cache_max_num_managed_bytes; if (other.is_set_latency_summary()) { this.latency_summary = new LatencySampleSummary(other.latency_summary); } } public DomainStatisticsSummary deepCopy() { return new DomainStatisticsSummary(this); } @Override public void clear() { set_id_isSet(false); this.id = 0; set_throughput_total_isSet(false); this.throughput_total = 0.0; set_response_data_throughput_total_isSet(false); this.response_data_throughput_total = 0.0; set_num_requests_total_isSet(false); this.num_requests_total = 0; set_num_hits_total_isSet(false); this.num_hits_total = 0; set_num_l1_cache_hits_total_isSet(false); this.num_l1_cache_hits_total = 0; set_num_l2_cache_hits_total_isSet(false); this.num_l2_cache_hits_total = 0; set_cache_num_items_isSet(false); this.cache_num_items = 0; set_cache_max_num_items_isSet(false); this.cache_max_num_items = 0; set_cache_num_managed_bytes_isSet(false); this.cache_num_managed_bytes = 0; set_cache_max_num_managed_bytes_isSet(false); this.cache_max_num_managed_bytes = 0; this.latency_summary = null; } public int get_id() { return this.id; } public DomainStatisticsSummary set_id(int id) { this.id = id; set_id_isSet(true); return this; } public void unset_id() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID); } /** Returns true if field id is set (has been assigned a value) and false otherwise */ public boolean is_set_id() { return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID); } public void set_id_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value); } public double get_throughput_total() { return this.throughput_total; } public DomainStatisticsSummary set_throughput_total(double throughput_total) { this.throughput_total = throughput_total; set_throughput_total_isSet(true); return this; } public void unset_throughput_total() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __THROUGHPUT_TOTAL_ISSET_ID); } /** Returns true if field throughput_total is set (has been assigned a value) and false otherwise */ public boolean is_set_throughput_total() { return EncodingUtils.testBit(__isset_bitfield, __THROUGHPUT_TOTAL_ISSET_ID); } public void set_throughput_total_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __THROUGHPUT_TOTAL_ISSET_ID, value); } public double get_response_data_throughput_total() { return this.response_data_throughput_total; } public DomainStatisticsSummary set_response_data_throughput_total(double response_data_throughput_total) { this.response_data_throughput_total = response_data_throughput_total; set_response_data_throughput_total_isSet(true); return this; } public void unset_response_data_throughput_total() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESPONSE_DATA_THROUGHPUT_TOTAL_ISSET_ID); } /** Returns true if field response_data_throughput_total is set (has been assigned a value) and false otherwise */ public boolean is_set_response_data_throughput_total() { return EncodingUtils.testBit(__isset_bitfield, __RESPONSE_DATA_THROUGHPUT_TOTAL_ISSET_ID); } public void set_response_data_throughput_total_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESPONSE_DATA_THROUGHPUT_TOTAL_ISSET_ID, value); } public long get_num_requests_total() { return this.num_requests_total; } public DomainStatisticsSummary set_num_requests_total(long num_requests_total) { this.num_requests_total = num_requests_total; set_num_requests_total_isSet(true); return this; } public void unset_num_requests_total() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_REQUESTS_TOTAL_ISSET_ID); } /** Returns true if field num_requests_total is set (has been assigned a value) and false otherwise */ public boolean is_set_num_requests_total() { return EncodingUtils.testBit(__isset_bitfield, __NUM_REQUESTS_TOTAL_ISSET_ID); } public void set_num_requests_total_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_REQUESTS_TOTAL_ISSET_ID, value); } public long get_num_hits_total() { return this.num_hits_total; } public DomainStatisticsSummary set_num_hits_total(long num_hits_total) { this.num_hits_total = num_hits_total; set_num_hits_total_isSet(true); return this; } public void unset_num_hits_total() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_HITS_TOTAL_ISSET_ID); } /** Returns true if field num_hits_total is set (has been assigned a value) and false otherwise */ public boolean is_set_num_hits_total() { return EncodingUtils.testBit(__isset_bitfield, __NUM_HITS_TOTAL_ISSET_ID); } public void set_num_hits_total_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_HITS_TOTAL_ISSET_ID, value); } public long get_num_l1_cache_hits_total() { return this.num_l1_cache_hits_total; } public DomainStatisticsSummary set_num_l1_cache_hits_total(long num_l1_cache_hits_total) { this.num_l1_cache_hits_total = num_l1_cache_hits_total; set_num_l1_cache_hits_total_isSet(true); return this; } public void unset_num_l1_cache_hits_total() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_L1_CACHE_HITS_TOTAL_ISSET_ID); } /** Returns true if field num_l1_cache_hits_total is set (has been assigned a value) and false otherwise */ public boolean is_set_num_l1_cache_hits_total() { return EncodingUtils.testBit(__isset_bitfield, __NUM_L1_CACHE_HITS_TOTAL_ISSET_ID); } public void set_num_l1_cache_hits_total_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_L1_CACHE_HITS_TOTAL_ISSET_ID, value); } public long get_num_l2_cache_hits_total() { return this.num_l2_cache_hits_total; } public DomainStatisticsSummary set_num_l2_cache_hits_total(long num_l2_cache_hits_total) { this.num_l2_cache_hits_total = num_l2_cache_hits_total; set_num_l2_cache_hits_total_isSet(true); return this; } public void unset_num_l2_cache_hits_total() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUM_L2_CACHE_HITS_TOTAL_ISSET_ID); } /** Returns true if field num_l2_cache_hits_total is set (has been assigned a value) and false otherwise */ public boolean is_set_num_l2_cache_hits_total() { return EncodingUtils.testBit(__isset_bitfield, __NUM_L2_CACHE_HITS_TOTAL_ISSET_ID); } public void set_num_l2_cache_hits_total_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUM_L2_CACHE_HITS_TOTAL_ISSET_ID, value); } public long get_cache_num_items() { return this.cache_num_items; } public DomainStatisticsSummary set_cache_num_items(long cache_num_items) { this.cache_num_items = cache_num_items; set_cache_num_items_isSet(true); return this; } public void unset_cache_num_items() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CACHE_NUM_ITEMS_ISSET_ID); } /** Returns true if field cache_num_items is set (has been assigned a value) and false otherwise */ public boolean is_set_cache_num_items() { return EncodingUtils.testBit(__isset_bitfield, __CACHE_NUM_ITEMS_ISSET_ID); } public void set_cache_num_items_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CACHE_NUM_ITEMS_ISSET_ID, value); } public long get_cache_max_num_items() { return this.cache_max_num_items; } public DomainStatisticsSummary set_cache_max_num_items(long cache_max_num_items) { this.cache_max_num_items = cache_max_num_items; set_cache_max_num_items_isSet(true); return this; } public void unset_cache_max_num_items() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CACHE_MAX_NUM_ITEMS_ISSET_ID); } /** Returns true if field cache_max_num_items is set (has been assigned a value) and false otherwise */ public boolean is_set_cache_max_num_items() { return EncodingUtils.testBit(__isset_bitfield, __CACHE_MAX_NUM_ITEMS_ISSET_ID); } public void set_cache_max_num_items_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CACHE_MAX_NUM_ITEMS_ISSET_ID, value); } public long get_cache_num_managed_bytes() { return this.cache_num_managed_bytes; } public DomainStatisticsSummary set_cache_num_managed_bytes(long cache_num_managed_bytes) { this.cache_num_managed_bytes = cache_num_managed_bytes; set_cache_num_managed_bytes_isSet(true); return this; } public void unset_cache_num_managed_bytes() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CACHE_NUM_MANAGED_BYTES_ISSET_ID); } /** Returns true if field cache_num_managed_bytes is set (has been assigned a value) and false otherwise */ public boolean is_set_cache_num_managed_bytes() { return EncodingUtils.testBit(__isset_bitfield, __CACHE_NUM_MANAGED_BYTES_ISSET_ID); } public void set_cache_num_managed_bytes_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CACHE_NUM_MANAGED_BYTES_ISSET_ID, value); } public long get_cache_max_num_managed_bytes() { return this.cache_max_num_managed_bytes; } public DomainStatisticsSummary set_cache_max_num_managed_bytes(long cache_max_num_managed_bytes) { this.cache_max_num_managed_bytes = cache_max_num_managed_bytes; set_cache_max_num_managed_bytes_isSet(true); return this; } public void unset_cache_max_num_managed_bytes() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CACHE_MAX_NUM_MANAGED_BYTES_ISSET_ID); } /** Returns true if field cache_max_num_managed_bytes is set (has been assigned a value) and false otherwise */ public boolean is_set_cache_max_num_managed_bytes() { return EncodingUtils.testBit(__isset_bitfield, __CACHE_MAX_NUM_MANAGED_BYTES_ISSET_ID); } public void set_cache_max_num_managed_bytes_isSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CACHE_MAX_NUM_MANAGED_BYTES_ISSET_ID, value); } public LatencySampleSummary get_latency_summary() { return this.latency_summary; } public DomainStatisticsSummary set_latency_summary(LatencySampleSummary latency_summary) { this.latency_summary = latency_summary; return this; } public void unset_latency_summary() { this.latency_summary = null; } /** Returns true if field latency_summary is set (has been assigned a value) and false otherwise */ public boolean is_set_latency_summary() { return this.latency_summary != null; } public void set_latency_summary_isSet(boolean value) { if (!value) { this.latency_summary = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case ID: if (value == null) { unset_id(); } else { set_id((Integer)value); } break; case THROUGHPUT_TOTAL: if (value == null) { unset_throughput_total(); } else { set_throughput_total((Double)value); } break; case RESPONSE_DATA_THROUGHPUT_TOTAL: if (value == null) { unset_response_data_throughput_total(); } else { set_response_data_throughput_total((Double)value); } break; case NUM_REQUESTS_TOTAL: if (value == null) { unset_num_requests_total(); } else { set_num_requests_total((Long)value); } break; case NUM_HITS_TOTAL: if (value == null) { unset_num_hits_total(); } else { set_num_hits_total((Long)value); } break; case NUM_L1_CACHE_HITS_TOTAL: if (value == null) { unset_num_l1_cache_hits_total(); } else { set_num_l1_cache_hits_total((Long)value); } break; case NUM_L2_CACHE_HITS_TOTAL: if (value == null) { unset_num_l2_cache_hits_total(); } else { set_num_l2_cache_hits_total((Long)value); } break; case CACHE_NUM_ITEMS: if (value == null) { unset_cache_num_items(); } else { set_cache_num_items((Long)value); } break; case CACHE_MAX_NUM_ITEMS: if (value == null) { unset_cache_max_num_items(); } else { set_cache_max_num_items((Long)value); } break; case CACHE_NUM_MANAGED_BYTES: if (value == null) { unset_cache_num_managed_bytes(); } else { set_cache_num_managed_bytes((Long)value); } break; case CACHE_MAX_NUM_MANAGED_BYTES: if (value == null) { unset_cache_max_num_managed_bytes(); } else { set_cache_max_num_managed_bytes((Long)value); } break; case LATENCY_SUMMARY: if (value == null) { unset_latency_summary(); } else { set_latency_summary((LatencySampleSummary)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case ID: return Integer.valueOf(get_id()); case THROUGHPUT_TOTAL: return Double.valueOf(get_throughput_total()); case RESPONSE_DATA_THROUGHPUT_TOTAL: return Double.valueOf(get_response_data_throughput_total()); case NUM_REQUESTS_TOTAL: return Long.valueOf(get_num_requests_total()); case NUM_HITS_TOTAL: return Long.valueOf(get_num_hits_total()); case NUM_L1_CACHE_HITS_TOTAL: return Long.valueOf(get_num_l1_cache_hits_total()); case NUM_L2_CACHE_HITS_TOTAL: return Long.valueOf(get_num_l2_cache_hits_total()); case CACHE_NUM_ITEMS: return Long.valueOf(get_cache_num_items()); case CACHE_MAX_NUM_ITEMS: return Long.valueOf(get_cache_max_num_items()); case CACHE_NUM_MANAGED_BYTES: return Long.valueOf(get_cache_num_managed_bytes()); case CACHE_MAX_NUM_MANAGED_BYTES: return Long.valueOf(get_cache_max_num_managed_bytes()); case LATENCY_SUMMARY: return get_latency_summary(); } 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 ID: return is_set_id(); case THROUGHPUT_TOTAL: return is_set_throughput_total(); case RESPONSE_DATA_THROUGHPUT_TOTAL: return is_set_response_data_throughput_total(); case NUM_REQUESTS_TOTAL: return is_set_num_requests_total(); case NUM_HITS_TOTAL: return is_set_num_hits_total(); case NUM_L1_CACHE_HITS_TOTAL: return is_set_num_l1_cache_hits_total(); case NUM_L2_CACHE_HITS_TOTAL: return is_set_num_l2_cache_hits_total(); case CACHE_NUM_ITEMS: return is_set_cache_num_items(); case CACHE_MAX_NUM_ITEMS: return is_set_cache_max_num_items(); case CACHE_NUM_MANAGED_BYTES: return is_set_cache_num_managed_bytes(); case CACHE_MAX_NUM_MANAGED_BYTES: return is_set_cache_max_num_managed_bytes(); case LATENCY_SUMMARY: return is_set_latency_summary(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof DomainStatisticsSummary) return this.equals((DomainStatisticsSummary)that); return false; } public boolean equals(DomainStatisticsSummary that) { if (that == null) return false; boolean this_present_id = true; boolean that_present_id = true; if (this_present_id || that_present_id) { if (!(this_present_id && that_present_id)) return false; if (this.id != that.id) return false; } boolean this_present_throughput_total = true; boolean that_present_throughput_total = true; if (this_present_throughput_total || that_present_throughput_total) { if (!(this_present_throughput_total && that_present_throughput_total)) return false; if (this.throughput_total != that.throughput_total) return false; } boolean this_present_response_data_throughput_total = true; boolean that_present_response_data_throughput_total = true; if (this_present_response_data_throughput_total || that_present_response_data_throughput_total) { if (!(this_present_response_data_throughput_total && that_present_response_data_throughput_total)) return false; if (this.response_data_throughput_total != that.response_data_throughput_total) return false; } boolean this_present_num_requests_total = true; boolean that_present_num_requests_total = true; if (this_present_num_requests_total || that_present_num_requests_total) { if (!(this_present_num_requests_total && that_present_num_requests_total)) return false; if (this.num_requests_total != that.num_requests_total) return false; } boolean this_present_num_hits_total = true; boolean that_present_num_hits_total = true; if (this_present_num_hits_total || that_present_num_hits_total) { if (!(this_present_num_hits_total && that_present_num_hits_total)) return false; if (this.num_hits_total != that.num_hits_total) return false; } boolean this_present_num_l1_cache_hits_total = true; boolean that_present_num_l1_cache_hits_total = true; if (this_present_num_l1_cache_hits_total || that_present_num_l1_cache_hits_total) { if (!(this_present_num_l1_cache_hits_total && that_present_num_l1_cache_hits_total)) return false; if (this.num_l1_cache_hits_total != that.num_l1_cache_hits_total) return false; } boolean this_present_num_l2_cache_hits_total = true; boolean that_present_num_l2_cache_hits_total = true; if (this_present_num_l2_cache_hits_total || that_present_num_l2_cache_hits_total) { if (!(this_present_num_l2_cache_hits_total && that_present_num_l2_cache_hits_total)) return false; if (this.num_l2_cache_hits_total != that.num_l2_cache_hits_total) return false; } boolean this_present_cache_num_items = true; boolean that_present_cache_num_items = true; if (this_present_cache_num_items || that_present_cache_num_items) { if (!(this_present_cache_num_items && that_present_cache_num_items)) return false; if (this.cache_num_items != that.cache_num_items) return false; } boolean this_present_cache_max_num_items = true; boolean that_present_cache_max_num_items = true; if (this_present_cache_max_num_items || that_present_cache_max_num_items) { if (!(this_present_cache_max_num_items && that_present_cache_max_num_items)) return false; if (this.cache_max_num_items != that.cache_max_num_items) return false; } boolean this_present_cache_num_managed_bytes = true; boolean that_present_cache_num_managed_bytes = true; if (this_present_cache_num_managed_bytes || that_present_cache_num_managed_bytes) { if (!(this_present_cache_num_managed_bytes && that_present_cache_num_managed_bytes)) return false; if (this.cache_num_managed_bytes != that.cache_num_managed_bytes) return false; } boolean this_present_cache_max_num_managed_bytes = true; boolean that_present_cache_max_num_managed_bytes = true; if (this_present_cache_max_num_managed_bytes || that_present_cache_max_num_managed_bytes) { if (!(this_present_cache_max_num_managed_bytes && that_present_cache_max_num_managed_bytes)) return false; if (this.cache_max_num_managed_bytes != that.cache_max_num_managed_bytes) return false; } boolean this_present_latency_summary = true && this.is_set_latency_summary(); boolean that_present_latency_summary = true && that.is_set_latency_summary(); if (this_present_latency_summary || that_present_latency_summary) { if (!(this_present_latency_summary && that_present_latency_summary)) return false; if (!this.latency_summary.equals(that.latency_summary)) return false; } return true; } @Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_id = true; builder.append(present_id); if (present_id) builder.append(id); boolean present_throughput_total = true; builder.append(present_throughput_total); if (present_throughput_total) builder.append(throughput_total); boolean present_response_data_throughput_total = true; builder.append(present_response_data_throughput_total); if (present_response_data_throughput_total) builder.append(response_data_throughput_total); boolean present_num_requests_total = true; builder.append(present_num_requests_total); if (present_num_requests_total) builder.append(num_requests_total); boolean present_num_hits_total = true; builder.append(present_num_hits_total); if (present_num_hits_total) builder.append(num_hits_total); boolean present_num_l1_cache_hits_total = true; builder.append(present_num_l1_cache_hits_total); if (present_num_l1_cache_hits_total) builder.append(num_l1_cache_hits_total); boolean present_num_l2_cache_hits_total = true; builder.append(present_num_l2_cache_hits_total); if (present_num_l2_cache_hits_total) builder.append(num_l2_cache_hits_total); boolean present_cache_num_items = true; builder.append(present_cache_num_items); if (present_cache_num_items) builder.append(cache_num_items); boolean present_cache_max_num_items = true; builder.append(present_cache_max_num_items); if (present_cache_max_num_items) builder.append(cache_max_num_items); boolean present_cache_num_managed_bytes = true; builder.append(present_cache_num_managed_bytes); if (present_cache_num_managed_bytes) builder.append(cache_num_managed_bytes); boolean present_cache_max_num_managed_bytes = true; builder.append(present_cache_max_num_managed_bytes); if (present_cache_max_num_managed_bytes) builder.append(cache_max_num_managed_bytes); boolean present_latency_summary = true && (is_set_latency_summary()); builder.append(present_latency_summary); if (present_latency_summary) builder.append(latency_summary); return builder.toHashCode(); } @Override public int compareTo(DomainStatisticsSummary other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_id()).compareTo(other.is_set_id()); if (lastComparison != 0) { return lastComparison; } if (is_set_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_throughput_total()).compareTo(other.is_set_throughput_total()); if (lastComparison != 0) { return lastComparison; } if (is_set_throughput_total()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.throughput_total, other.throughput_total); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_response_data_throughput_total()).compareTo(other.is_set_response_data_throughput_total()); if (lastComparison != 0) { return lastComparison; } if (is_set_response_data_throughput_total()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.response_data_throughput_total, other.response_data_throughput_total); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_num_requests_total()).compareTo(other.is_set_num_requests_total()); if (lastComparison != 0) { return lastComparison; } if (is_set_num_requests_total()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_requests_total, other.num_requests_total); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_num_hits_total()).compareTo(other.is_set_num_hits_total()); if (lastComparison != 0) { return lastComparison; } if (is_set_num_hits_total()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_hits_total, other.num_hits_total); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_num_l1_cache_hits_total()).compareTo(other.is_set_num_l1_cache_hits_total()); if (lastComparison != 0) { return lastComparison; } if (is_set_num_l1_cache_hits_total()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_l1_cache_hits_total, other.num_l1_cache_hits_total); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_num_l2_cache_hits_total()).compareTo(other.is_set_num_l2_cache_hits_total()); if (lastComparison != 0) { return lastComparison; } if (is_set_num_l2_cache_hits_total()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_l2_cache_hits_total, other.num_l2_cache_hits_total); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_cache_num_items()).compareTo(other.is_set_cache_num_items()); if (lastComparison != 0) { return lastComparison; } if (is_set_cache_num_items()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cache_num_items, other.cache_num_items); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_cache_max_num_items()).compareTo(other.is_set_cache_max_num_items()); if (lastComparison != 0) { return lastComparison; } if (is_set_cache_max_num_items()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cache_max_num_items, other.cache_max_num_items); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_cache_num_managed_bytes()).compareTo(other.is_set_cache_num_managed_bytes()); if (lastComparison != 0) { return lastComparison; } if (is_set_cache_num_managed_bytes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cache_num_managed_bytes, other.cache_num_managed_bytes); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_cache_max_num_managed_bytes()).compareTo(other.is_set_cache_max_num_managed_bytes()); if (lastComparison != 0) { return lastComparison; } if (is_set_cache_max_num_managed_bytes()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cache_max_num_managed_bytes, other.cache_max_num_managed_bytes); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_latency_summary()).compareTo(other.is_set_latency_summary()); if (lastComparison != 0) { return lastComparison; } if (is_set_latency_summary()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.latency_summary, other.latency_summary); 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("DomainStatisticsSummary("); boolean first = true; sb.append("id:"); sb.append(this.id); first = false; if (!first) sb.append(", "); sb.append("throughput_total:"); sb.append(this.throughput_total); first = false; if (!first) sb.append(", "); sb.append("response_data_throughput_total:"); sb.append(this.response_data_throughput_total); first = false; if (!first) sb.append(", "); sb.append("num_requests_total:"); sb.append(this.num_requests_total); first = false; if (!first) sb.append(", "); sb.append("num_hits_total:"); sb.append(this.num_hits_total); first = false; if (!first) sb.append(", "); sb.append("num_l1_cache_hits_total:"); sb.append(this.num_l1_cache_hits_total); first = false; if (!first) sb.append(", "); sb.append("num_l2_cache_hits_total:"); sb.append(this.num_l2_cache_hits_total); first = false; if (!first) sb.append(", "); sb.append("cache_num_items:"); sb.append(this.cache_num_items); first = false; if (!first) sb.append(", "); sb.append("cache_max_num_items:"); sb.append(this.cache_max_num_items); first = false; if (!first) sb.append(", "); sb.append("cache_num_managed_bytes:"); sb.append(this.cache_num_managed_bytes); first = false; if (!first) sb.append(", "); sb.append("cache_max_num_managed_bytes:"); sb.append(this.cache_max_num_managed_bytes); first = false; if (is_set_latency_summary()) { if (!first) sb.append(", "); sb.append("latency_summary:"); if (this.latency_summary == null) { sb.append("null"); } else { sb.append(this.latency_summary); } first = false; } sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // alas, we cannot check 'id' because it's a primitive and you chose the non-beans generator. // alas, we cannot check 'throughput_total' because it's a primitive and you chose the non-beans generator. // alas, we cannot check 'response_data_throughput_total' because it's a primitive and you chose the non-beans generator. // alas, we cannot check 'num_requests_total' because it's a primitive and you chose the non-beans generator. // alas, we cannot check 'num_hits_total' because it's a primitive and you chose the non-beans generator. // alas, we cannot check 'num_l1_cache_hits_total' because it's a primitive and you chose the non-beans generator. // alas, we cannot check 'num_l2_cache_hits_total' because it's a primitive and you chose the non-beans generator. // alas, we cannot check 'cache_num_items' because it's a primitive and you chose the non-beans generator. // alas, we cannot check 'cache_max_num_items' because it's a primitive and you chose the non-beans generator. // alas, we cannot check 'cache_num_managed_bytes' because it's a primitive and you chose the non-beans generator. // alas, we cannot check 'cache_max_num_managed_bytes' because it's a primitive and you chose the non-beans generator. // check for sub-struct validity if (latency_summary != null) { latency_summary.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 DomainStatisticsSummaryStandardSchemeFactory implements SchemeFactory { public DomainStatisticsSummaryStandardScheme getScheme() { return new DomainStatisticsSummaryStandardScheme(); } } private static class DomainStatisticsSummaryStandardScheme extends StandardScheme<DomainStatisticsSummary> { public void read(org.apache.thrift.protocol.TProtocol iprot, DomainStatisticsSummary 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: // ID if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.id = iprot.readI32(); struct.set_id_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // THROUGHPUT_TOTAL if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.throughput_total = iprot.readDouble(); struct.set_throughput_total_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // RESPONSE_DATA_THROUGHPUT_TOTAL if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.response_data_throughput_total = iprot.readDouble(); struct.set_response_data_throughput_total_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // NUM_REQUESTS_TOTAL if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.num_requests_total = iprot.readI64(); struct.set_num_requests_total_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // NUM_HITS_TOTAL if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.num_hits_total = iprot.readI64(); struct.set_num_hits_total_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // NUM_L1_CACHE_HITS_TOTAL if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.num_l1_cache_hits_total = iprot.readI64(); struct.set_num_l1_cache_hits_total_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // NUM_L2_CACHE_HITS_TOTAL if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.num_l2_cache_hits_total = iprot.readI64(); struct.set_num_l2_cache_hits_total_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 8: // CACHE_NUM_ITEMS if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.cache_num_items = iprot.readI64(); struct.set_cache_num_items_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 9: // CACHE_MAX_NUM_ITEMS if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.cache_max_num_items = iprot.readI64(); struct.set_cache_max_num_items_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 10: // CACHE_NUM_MANAGED_BYTES if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.cache_num_managed_bytes = iprot.readI64(); struct.set_cache_num_managed_bytes_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 11: // CACHE_MAX_NUM_MANAGED_BYTES if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.cache_max_num_managed_bytes = iprot.readI64(); struct.set_cache_max_num_managed_bytes_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 12: // LATENCY_SUMMARY if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.latency_summary = new LatencySampleSummary(); struct.latency_summary.read(iprot); struct.set_latency_summary_isSet(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 if (!struct.is_set_id()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' was not found in serialized data! Struct: " + toString()); } if (!struct.is_set_throughput_total()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'throughput_total' was not found in serialized data! Struct: " + toString()); } if (!struct.is_set_response_data_throughput_total()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'response_data_throughput_total' was not found in serialized data! Struct: " + toString()); } if (!struct.is_set_num_requests_total()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_requests_total' was not found in serialized data! Struct: " + toString()); } if (!struct.is_set_num_hits_total()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_hits_total' was not found in serialized data! Struct: " + toString()); } if (!struct.is_set_num_l1_cache_hits_total()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_l1_cache_hits_total' was not found in serialized data! Struct: " + toString()); } if (!struct.is_set_num_l2_cache_hits_total()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_l2_cache_hits_total' was not found in serialized data! Struct: " + toString()); } if (!struct.is_set_cache_num_items()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'cache_num_items' was not found in serialized data! Struct: " + toString()); } if (!struct.is_set_cache_max_num_items()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'cache_max_num_items' was not found in serialized data! Struct: " + toString()); } if (!struct.is_set_cache_num_managed_bytes()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'cache_num_managed_bytes' was not found in serialized data! Struct: " + toString()); } if (!struct.is_set_cache_max_num_managed_bytes()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'cache_max_num_managed_bytes' was not found in serialized data! Struct: " + toString()); } struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, DomainStatisticsSummary struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(ID_FIELD_DESC); oprot.writeI32(struct.id); oprot.writeFieldEnd(); oprot.writeFieldBegin(THROUGHPUT_TOTAL_FIELD_DESC); oprot.writeDouble(struct.throughput_total); oprot.writeFieldEnd(); oprot.writeFieldBegin(RESPONSE_DATA_THROUGHPUT_TOTAL_FIELD_DESC); oprot.writeDouble(struct.response_data_throughput_total); oprot.writeFieldEnd(); oprot.writeFieldBegin(NUM_REQUESTS_TOTAL_FIELD_DESC); oprot.writeI64(struct.num_requests_total); oprot.writeFieldEnd(); oprot.writeFieldBegin(NUM_HITS_TOTAL_FIELD_DESC); oprot.writeI64(struct.num_hits_total); oprot.writeFieldEnd(); oprot.writeFieldBegin(NUM_L1_CACHE_HITS_TOTAL_FIELD_DESC); oprot.writeI64(struct.num_l1_cache_hits_total); oprot.writeFieldEnd(); oprot.writeFieldBegin(NUM_L2_CACHE_HITS_TOTAL_FIELD_DESC); oprot.writeI64(struct.num_l2_cache_hits_total); oprot.writeFieldEnd(); oprot.writeFieldBegin(CACHE_NUM_ITEMS_FIELD_DESC); oprot.writeI64(struct.cache_num_items); oprot.writeFieldEnd(); oprot.writeFieldBegin(CACHE_MAX_NUM_ITEMS_FIELD_DESC); oprot.writeI64(struct.cache_max_num_items); oprot.writeFieldEnd(); oprot.writeFieldBegin(CACHE_NUM_MANAGED_BYTES_FIELD_DESC); oprot.writeI64(struct.cache_num_managed_bytes); oprot.writeFieldEnd(); oprot.writeFieldBegin(CACHE_MAX_NUM_MANAGED_BYTES_FIELD_DESC); oprot.writeI64(struct.cache_max_num_managed_bytes); oprot.writeFieldEnd(); if (struct.latency_summary != null) { if (struct.is_set_latency_summary()) { oprot.writeFieldBegin(LATENCY_SUMMARY_FIELD_DESC); struct.latency_summary.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class DomainStatisticsSummaryTupleSchemeFactory implements SchemeFactory { public DomainStatisticsSummaryTupleScheme getScheme() { return new DomainStatisticsSummaryTupleScheme(); } } private static class DomainStatisticsSummaryTupleScheme extends TupleScheme<DomainStatisticsSummary> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, DomainStatisticsSummary struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeI32(struct.id); oprot.writeDouble(struct.throughput_total); oprot.writeDouble(struct.response_data_throughput_total); oprot.writeI64(struct.num_requests_total); oprot.writeI64(struct.num_hits_total); oprot.writeI64(struct.num_l1_cache_hits_total); oprot.writeI64(struct.num_l2_cache_hits_total); oprot.writeI64(struct.cache_num_items); oprot.writeI64(struct.cache_max_num_items); oprot.writeI64(struct.cache_num_managed_bytes); oprot.writeI64(struct.cache_max_num_managed_bytes); BitSet optionals = new BitSet(); if (struct.is_set_latency_summary()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.is_set_latency_summary()) { struct.latency_summary.write(oprot); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, DomainStatisticsSummary struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.id = iprot.readI32(); struct.set_id_isSet(true); struct.throughput_total = iprot.readDouble(); struct.set_throughput_total_isSet(true); struct.response_data_throughput_total = iprot.readDouble(); struct.set_response_data_throughput_total_isSet(true); struct.num_requests_total = iprot.readI64(); struct.set_num_requests_total_isSet(true); struct.num_hits_total = iprot.readI64(); struct.set_num_hits_total_isSet(true); struct.num_l1_cache_hits_total = iprot.readI64(); struct.set_num_l1_cache_hits_total_isSet(true); struct.num_l2_cache_hits_total = iprot.readI64(); struct.set_num_l2_cache_hits_total_isSet(true); struct.cache_num_items = iprot.readI64(); struct.set_cache_num_items_isSet(true); struct.cache_max_num_items = iprot.readI64(); struct.set_cache_max_num_items_isSet(true); struct.cache_num_managed_bytes = iprot.readI64(); struct.set_cache_num_managed_bytes_isSet(true); struct.cache_max_num_managed_bytes = iprot.readI64(); struct.set_cache_max_num_managed_bytes_isSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.latency_summary = new LatencySampleSummary(); struct.latency_summary.read(iprot); struct.set_latency_summary_isSet(true); } } } }