/** * Performs a deep copy on <i>other</i>. */ public SupervisorSummary(SupervisorSummary other) { __isset_bitfield = other.__isset_bitfield; if (other.is_set_host()) { this.host = other.host; } this.uptime_secs = other.uptime_secs; this.num_workers = other.num_workers; this.num_used_workers = other.num_used_workers; if (other.is_set_supervisor_id()) { this.supervisor_id = other.supervisor_id; } if (other.is_set_version()) { this.version = other.version; } if (other.is_set_total_resources()) { java.util.Map<java.lang.String,java.lang.Double> __this__total_resources = new java.util.HashMap<java.lang.String,java.lang.Double>(other.total_resources); this.total_resources = __this__total_resources; } this.used_mem = other.used_mem; this.used_cpu = other.used_cpu; this.fragmented_mem = other.fragmented_mem; this.fragmented_cpu = other.fragmented_cpu; }
lastComparison = java.lang.Boolean.valueOf(is_set_host()).compareTo(other.is_set_host()); if (lastComparison != 0) { return lastComparison; if (is_set_host()) { lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.host, other.host); if (lastComparison != 0) {
int hashCode = 1; hashCode = hashCode * 8191 + ((is_set_host()) ? 131071 : 524287); if (is_set_host()) hashCode = hashCode * 8191 + host.hashCode();
return true; boolean this_present_host = true && this.is_set_host(); boolean that_present_host = true && that.is_set_host(); if (this_present_host || that_present_host) { if (!(this_present_host && that_present_host))
return is_set_host(); case UPTIME_SECS: return is_set_uptime_secs();
public void validate() throws org.apache.storm.thrift.TException { // check for required fields if (!is_set_host()) { throw new org.apache.storm.thrift.protocol.TProtocolException("Required field 'host' is unset! Struct:" + toString()); } if (!is_set_uptime_secs()) { throw new org.apache.storm.thrift.protocol.TProtocolException("Required field 'uptime_secs' is unset! Struct:" + toString()); } if (!is_set_num_workers()) { throw new org.apache.storm.thrift.protocol.TProtocolException("Required field 'num_workers' is unset! Struct:" + toString()); } if (!is_set_num_used_workers()) { throw new org.apache.storm.thrift.protocol.TProtocolException("Required field 'num_used_workers' is unset! Struct:" + toString()); } if (!is_set_supervisor_id()) { throw new org.apache.storm.thrift.protocol.TProtocolException("Required field 'supervisor_id' is unset! Struct:" + toString()); } // check for sub-struct validity }
List<Object> list = new ArrayList<Object>(); boolean present_host = true && (is_set_host()); list.add(present_host); if (present_host)
/** * Performs a deep copy on <i>other</i>. */ public SupervisorSummary(SupervisorSummary other) { __isset_bitfield = other.__isset_bitfield; if (other.is_set_host()) { this.host = other.host; } this.uptime_secs = other.uptime_secs; this.num_workers = other.num_workers; this.num_used_workers = other.num_used_workers; if (other.is_set_supervisor_id()) { this.supervisor_id = other.supervisor_id; } if (other.is_set_version()) { this.version = other.version; } if (other.is_set_total_resources()) { Map<String,Double> __this__total_resources = new HashMap<String,Double>(other.total_resources); this.total_resources = __this__total_resources; } this.used_mem = other.used_mem; this.used_cpu = other.used_cpu; }
return false; boolean this_present_host = true && this.is_set_host(); boolean that_present_host = true && that.is_set_host(); if (this_present_host || that_present_host) { if (!(this_present_host && that_present_host))
lastComparison = Boolean.valueOf(is_set_host()).compareTo(other.is_set_host()); if (lastComparison != 0) { return lastComparison; if (is_set_host()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.host, other.host); if (lastComparison != 0) {
/** 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 HOST: return is_set_host(); case UPTIME_SECS: return is_set_uptime_secs(); case NUM_WORKERS: return is_set_num_workers(); case NUM_USED_WORKERS: return is_set_num_used_workers(); case SUPERVISOR_ID: return is_set_supervisor_id(); case VERSION: return is_set_version(); case TOTAL_RESOURCES: return is_set_total_resources(); case USED_MEM: return is_set_used_mem(); case USED_CPU: return is_set_used_cpu(); } throw new IllegalStateException(); }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_host()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'host' is unset! Struct:" + toString()); } if (!is_set_uptime_secs()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'uptime_secs' is unset! Struct:" + toString()); } if (!is_set_num_workers()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_workers' is unset! Struct:" + toString()); } if (!is_set_num_used_workers()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_used_workers' is unset! Struct:" + toString()); } if (!is_set_supervisor_id()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'supervisor_id' is unset! Struct:" + toString()); } // check for sub-struct validity }