/** * The domain passed in the request does not correspond to a valid domain */ public boolean get_no_such_domain() { if (getSetField() == _Fields.NO_SUCH_DOMAIN) { return (Boolean)getFieldValue(); } else { throw new RuntimeException("Cannot get field 'no_such_domain' because union is currently set to " + getFieldDesc(getSetField()).name); } }
/** * Failed to perform query after a specified number of retries */ public int get_failed_retries() { if (getSetField() == _Fields.FAILED_RETRIES) { return (Integer)getFieldValue(); } else { throw new RuntimeException("Cannot get field 'failed_retries' because union is currently set to " + getFieldDesc(getSetField()).name); } }
/** * There was no replica for a given partition */ public boolean get_no_replica() { if (getSetField() == _Fields.NO_REPLICA) { return (Boolean)getFieldValue(); } else { throw new RuntimeException("Cannot get field 'no_replica' because union is currently set to " + getFieldDesc(getSetField()).name); } }
/** * There were no available connections for a given partition */ public boolean get_no_connection_available() { if (getSetField() == _Fields.NO_CONNECTION_AVAILABLE) { return (Boolean)getFieldValue(); } else { throw new RuntimeException("Cannot get field 'no_connection_available' because union is currently set to " + getFieldDesc(getSetField()).name); } }
@Override public int compareTo(HankException other) { int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField()); if (lastComparison == 0) { return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue()); } return lastComparison; }
/** * The host queried is not assigned the key that was requested */ public boolean get_wrong_host() { if (getSetField() == _Fields.WRONG_HOST) { return (Boolean)getFieldValue(); } else { throw new RuntimeException("Cannot get field 'wrong_host' because union is currently set to " + getFieldDesc(getSetField()).name); } }
/** * There was some internal error in the server. This is pretty bad. */ public String get_internal_error() { if (getSetField() == _Fields.INTERNAL_ERROR) { return (String)getFieldValue(); } else { throw new RuntimeException("Cannot get field 'internal_error' because union is currently set to " + getFieldDesc(getSetField()).name); } }
public boolean equals(HankException other) { return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue()); }
@Override public int hashCode() { HashCodeBuilder hcb = new HashCodeBuilder(); hcb.append(this.getClass().getName()); org.apache.thrift.TFieldIdEnum setField = getSetField(); if (setField != null) { hcb.append(setField.getThriftFieldId()); Object value = getFieldValue(); if (value instanceof org.apache.thrift.TEnum) { hcb.append(((org.apache.thrift.TEnum)getFieldValue()).getValue()); } else { hcb.append(value); } } return hcb.toHashCode(); } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {