@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getReadCapacityUnits() == null) ? 0 : getReadCapacityUnits().hashCode()); hashCode = prime * hashCode + ((getWriteCapacityUnits() == null) ? 0 : getWriteCapacityUnits().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ProvisionedThroughput == false) return false; ProvisionedThroughput other = (ProvisionedThroughput) obj; if (other.getReadCapacityUnits() == null ^ this.getReadCapacityUnits() == null) return false; if (other.getReadCapacityUnits() != null && other.getReadCapacityUnits().equals(this.getReadCapacityUnits()) == false) return false; if (other.getWriteCapacityUnits() == null ^ this.getWriteCapacityUnits() == null) return false; if (other.getWriteCapacityUnits() != null && other.getWriteCapacityUnits().equals(this.getWriteCapacityUnits()) == false) return false; return true; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getReadCapacityUnits() != null) sb.append("ReadCapacityUnits: ").append(getReadCapacityUnits()).append(","); if (getWriteCapacityUnits() != null) sb.append("WriteCapacityUnits: ").append(getWriteCapacityUnits()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(ProvisionedThroughput provisionedThroughput, ProtocolMarshaller protocolMarshaller) { if (provisionedThroughput == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(provisionedThroughput.getReadCapacityUnits(), READCAPACITYUNITS_BINDING); protocolMarshaller.marshall(provisionedThroughput.getWriteCapacityUnits(), WRITECAPACITYUNITS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getReadCapacityUnits() == null) ? 0 : getReadCapacityUnits().hashCode()); hashCode = prime * hashCode + ((getWriteCapacityUnits() == null) ? 0 : getWriteCapacityUnits().hashCode()); return hashCode; }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getReadCapacityUnits() != null) sb.append("ReadCapacityUnits: " + getReadCapacityUnits() + ","); if (getWriteCapacityUnits() != null) sb.append("WriteCapacityUnits: " + getWriteCapacityUnits()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ProvisionedThroughput == false) return false; ProvisionedThroughput other = (ProvisionedThroughput) obj; if (other.getReadCapacityUnits() == null ^ this.getReadCapacityUnits() == null) return false; if (other.getReadCapacityUnits() != null && other.getReadCapacityUnits().equals(this.getReadCapacityUnits()) == false) return false; if (other.getWriteCapacityUnits() == null ^ this.getWriteCapacityUnits() == null) return false; if (other.getWriteCapacityUnits() != null && other.getWriteCapacityUnits().equals(this.getWriteCapacityUnits()) == false) return false; return true; } }
public void marshall(ProvisionedThroughput provisionedThroughput, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (provisionedThroughput.getReadCapacityUnits() != null) { Long readCapacityUnits = provisionedThroughput.getReadCapacityUnits(); jsonWriter.name("ReadCapacityUnits"); jsonWriter.value(readCapacityUnits); } if (provisionedThroughput.getWriteCapacityUnits() != null) { Long writeCapacityUnits = provisionedThroughput.getWriteCapacityUnits(); jsonWriter.name("WriteCapacityUnits"); jsonWriter.value(writeCapacityUnits); } jsonWriter.endObject(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getReadCapacityUnits() == null) ? 0 : getReadCapacityUnits().hashCode()); hashCode = prime * hashCode + ((getWriteCapacityUnits() == null) ? 0 : getWriteCapacityUnits().hashCode()); return hashCode; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getReadCapacityUnits() != null) sb.append("ReadCapacityUnits: ").append(getReadCapacityUnits()).append(","); if (getWriteCapacityUnits() != null) sb.append("WriteCapacityUnits: ").append(getWriteCapacityUnits()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ProvisionedThroughput == false) return false; ProvisionedThroughput other = (ProvisionedThroughput) obj; if (other.getReadCapacityUnits() == null ^ this.getReadCapacityUnits() == null) return false; if (other.getReadCapacityUnits() != null && other.getReadCapacityUnits().equals(this.getReadCapacityUnits()) == false) return false; if (other.getWriteCapacityUnits() == null ^ this.getWriteCapacityUnits() == null) return false; if (other.getWriteCapacityUnits() != null && other.getWriteCapacityUnits().equals(this.getWriteCapacityUnits()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(ProvisionedThroughput provisionedThroughput, ProtocolMarshaller protocolMarshaller) { if (provisionedThroughput == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(provisionedThroughput.getReadCapacityUnits(), READCAPACITYUNITS_BINDING); protocolMarshaller.marshall(provisionedThroughput.getWriteCapacityUnits(), WRITECAPACITYUNITS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public void log() { Loggers.MAIN_LOG.info("[DS0000] Infinispan DynamoDB store: Endpoint (overrides region): {}", getEndpoint() != null ? getEndpoint() : "not set"); Loggers.MAIN_LOG.info("[DS0001] Infinispan DynamoDB store: Region: {}", getRegion()); Loggers.MAIN_LOG.info("[DS0002] Infinispan DynamoDB store: Item transformer class: {}", getItemTransformerClass().getCanonicalName()); Loggers.MAIN_LOG.info("[DS0009] Infinispan DynamoDB store: Query executor class: {}", getQueryExecutorClass() != null ? getQueryExecutorClass().getCanonicalName() : "none"); Loggers.MAIN_LOG.info("[DS0010] Infinispan DynamoDB store: Indexed attributes: {}", getIndexedAttributes() != null ? getIndexedAttributes() : "none"); Loggers.MAIN_LOG.info("[DS0004] Infinispan DynamoDB store: AWS secret access key: [hidden]"); Loggers.MAIN_LOG.info("[DS0005] Infinispan DynamoDB store: Capacity to provision: read={} write={}", getProvisionedThroughput().getReadCapacityUnits(), getProvisionedThroughput().getWriteCapacityUnits()); Loggers.MAIN_LOG.info("[DS0011] Infinispan DynamoDB store: Table encryption at rest: {}", isTableWithEncryptionAtRest()); Loggers.MAIN_LOG.info("[DS0006] Infinispan DynamoDB store: Table prefix: {}", getTablePrefix().isEmpty() ? "none" : getTablePrefix()); Loggers.MAIN_LOG.info("[DS0007] Infinispan DynamoDB store: Apply range key: {}", getApplyRangeKey() != null ? getApplyRangeKey() : "none"); Loggers.MAIN_LOG.info("[DS0008] Infinispan DynamoDB store: Range key value: {}", getRangeKeyValue() != null ? getRangeKeyValue() : "none"); Loggers.MAIN_LOG.info("[DS0003] Infinispan DynamoDB store: Enable stream: {}", enableStream); Loggers.MAIN_LOG.info("[DS0012] Infinispan DynamoDB store: Enable continuous backups: {}", enableContinuousBackups); Loggers.MAIN_LOG.info("[DS0013] Infinispan DynamoDB store: Explicit metric registry: {}", getMetricRegistry() != null); } }