@Override public String toString() { return "Parameters:[ hosts=" + this.hosts + ", ns=" + this.namespace + ", timeout=" + this.writePolicy.timeout + ", maxThroughput=" + this.maxThroughput + ", write-action=" + this.writePolicy.recordExistsAction.toString() + ", timeZoneOffset=" + this.timeZoneOffset + ", abortErrorCount=" + this.abortErrorCount + "]"; } }
/** * Returns the corresponding record exist action from the user specified exists policy name. * The default value is UPDATE * * @param existsPolicy exists policy name * @return corresponding record exist action */ private RecordExistsAction getRecordExistsAction(String existsPolicy) { if (existsPolicy == null) return RecordExistsAction.UPDATE; for (RecordExistsAction recordExistsActionEnum : RecordExistsAction.values()) { if (existsPolicy.equalsIgnoreCase(recordExistsActionEnum.toString())) { return recordExistsActionEnum; } } LOG.warn("Invalid record exists action provided, using the default record exists action."); return RecordExistsAction.UPDATE; }
/** * Returns the corresponding record exist action from the user specified exists policy name. * The default value is UPDATE * * @param existsPolicy exists policy name * @return corresponding record exist action */ private RecordExistsAction getRecordExistsAction(String existsPolicy) { if (existsPolicy == null) return RecordExistsAction.UPDATE; for (RecordExistsAction recordExistsActionEnum : RecordExistsAction.values()) { if (existsPolicy.equalsIgnoreCase(recordExistsActionEnum.toString())) { return recordExistsActionEnum; } } LOG.warn("Invalid record exists action provided, using the default record exists action."); return RecordExistsAction.UPDATE; }