@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((is_set_wait_secs()) ? 131071 : 524287); if (is_set_wait_secs()) hashCode = hashCode * 8191 + wait_secs; return hashCode; }
public boolean equals(KillOptions that) { if (that == null) return false; if (this == that) return true; boolean this_present_wait_secs = true && this.is_set_wait_secs(); boolean that_present_wait_secs = true && that.is_set_wait_secs(); if (this_present_wait_secs || that_present_wait_secs) { if (!(this_present_wait_secs && that_present_wait_secs)) return false; if (this.wait_secs != that.wait_secs) return false; } return true; }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case WAIT_SECS: return is_set_wait_secs(); } throw new java.lang.IllegalStateException(); }
@Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("KillOptions("); boolean first = true; if (is_set_wait_secs()) { sb.append("wait_secs:"); sb.append(this.wait_secs); first = false; } sb.append(")"); return sb.toString(); }
@Override public void write(org.apache.storm.thrift.protocol.TProtocol prot, KillOptions struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TTupleProtocol oprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.is_set_wait_secs()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.is_set_wait_secs()) { oprot.writeI32(struct.wait_secs); } }
@Override public int compareTo(KillOptions other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.valueOf(is_set_wait_secs()).compareTo(other.is_set_wait_secs()); if (lastComparison != 0) { return lastComparison; } if (is_set_wait_secs()) { lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.wait_secs, other.wait_secs); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public void killTopologyWithOpts(final String topoName, final KillOptions options) throws NotAliveException, AuthorizationException, TException { killTopologyWithOptsCalls.mark(); assertTopoActive(topoName, true); try { Map<String, Object> topoConf = tryReadTopoConfFromName(topoName); topoConf = Utils.merge(conf, topoConf); final String operation = "killTopology"; checkAuthorization(topoName, topoConf, operation); Integer waitAmount = null; if (options.is_set_wait_secs()) { waitAmount = options.get_wait_secs(); } transitionName(topoName, TopologyActions.KILL, waitAmount, true); notifyTopologyActionListener(topoName, operation); addTopoToHistoryLog((String) topoConf.get(Config.STORM_ID), topoConf); } catch (Exception e) { LOG.warn("Kill topology exception. (topology name='{}')", topoName, e); if (e instanceof TException) { throw (TException) e; } throw new RuntimeException(e); } }
public void write(org.apache.storm.thrift.protocol.TProtocol oprot, KillOptions struct) throws org.apache.storm.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.is_set_wait_secs()) { oprot.writeFieldBegin(WAIT_SECS_FIELD_DESC); oprot.writeI32(struct.wait_secs); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public boolean equals(KillOptions that) { if (that == null) return false; boolean this_present_wait_secs = true && this.is_set_wait_secs(); boolean that_present_wait_secs = true && that.is_set_wait_secs(); if (this_present_wait_secs || that_present_wait_secs) { if (!(this_present_wait_secs && that_present_wait_secs)) return false; if (this.wait_secs != that.wait_secs) return false; } return true; }
/** 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 WAIT_SECS: return is_set_wait_secs(); } throw new IllegalStateException(); }
@Override public String toString() { StringBuilder sb = new StringBuilder("KillOptions("); boolean first = true; if (is_set_wait_secs()) { sb.append("wait_secs:"); sb.append(this.wait_secs); first = false; } sb.append(")"); return sb.toString(); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_wait_secs = true && (is_set_wait_secs()); list.add(present_wait_secs); if (present_wait_secs) list.add(wait_secs); return list.hashCode(); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, KillOptions struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_wait_secs()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.is_set_wait_secs()) { oprot.writeI32(struct.wait_secs); } }
@Override public int compareTo(KillOptions other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_wait_secs()).compareTo(other.is_set_wait_secs()); if (lastComparison != 0) { return lastComparison; } if (is_set_wait_secs()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wait_secs, other.wait_secs); if (lastComparison != 0) { return lastComparison; } } return 0; }
public void write(org.apache.thrift.protocol.TProtocol oprot, KillOptions struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.is_set_wait_secs()) { oprot.writeFieldBegin(WAIT_SECS_FIELD_DESC); oprot.writeI32(struct.wait_secs); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }