System.out.println("Throughput"); System.out.format(" Read Capacity : %d\n", throughput_info.readCapacityUnits().longValue()); System.out.format(" Write Capacity: %d\n", throughput_info.writeCapacityUnits().longValue());
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(lastIncreaseDateTime()); hashCode = 31 * hashCode + Objects.hashCode(lastDecreaseDateTime()); hashCode = 31 * hashCode + Objects.hashCode(numberOfDecreasesToday()); hashCode = 31 * hashCode + Objects.hashCode(readCapacityUnits()); hashCode = 31 * hashCode + Objects.hashCode(writeCapacityUnits()); return hashCode; }
public final ProvisionedThroughputDescription.Builder getProvisionedThroughput() { return provisionedThroughput != null ? provisionedThroughput.toBuilder() : null; }
/** * <p> * The provisioned throughput settings for the table, consisting of read and write capacity units, along with * data about increases and decreases. * </p> * This is a convenience that creates an instance of the {@link ProvisionedThroughputDescription.Builder} * avoiding the need to create one manually via {@link ProvisionedThroughputDescription#builder()}. * * When the {@link Consumer} completes, {@link ProvisionedThroughputDescription.Builder#build()} is called * immediately and its result is passed to {@link #provisionedThroughput(ProvisionedThroughputDescription)}. * * @param provisionedThroughput * a consumer that will call methods on {@link ProvisionedThroughputDescription.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #provisionedThroughput(ProvisionedThroughputDescription) */ default Builder provisionedThroughput(Consumer<ProvisionedThroughputDescription.Builder> provisionedThroughput) { return provisionedThroughput(ProvisionedThroughputDescription.builder().applyMutation(provisionedThroughput).build()); }
@Override public ProvisionedThroughputDescription build() { return new ProvisionedThroughputDescription(this); }
/** * 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. */ @Override public String toString() { return ToString.builder("ProvisionedThroughputDescription").add("LastIncreaseDateTime", lastIncreaseDateTime()) .add("LastDecreaseDateTime", lastDecreaseDateTime()).add("NumberOfDecreasesToday", numberOfDecreasesToday()) .add("ReadCapacityUnits", readCapacityUnits()).add("WriteCapacityUnits", writeCapacityUnits()).build(); }
public final ProvisionedThroughputDescription.Builder getProvisionedThroughput() { return provisionedThroughput != null ? provisionedThroughput.toBuilder() : null; }
/** * <p> * Represents the provisioned throughput settings for the specified global secondary index. * </p> * <p> * For current minimum and maximum provisioned throughput values, see <a * href="http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Limits</a> in the * <i>Amazon DynamoDB Developer Guide</i>. * </p> * This is a convenience that creates an instance of the {@link ProvisionedThroughputDescription.Builder} * avoiding the need to create one manually via {@link ProvisionedThroughputDescription#builder()}. * * When the {@link Consumer} completes, {@link ProvisionedThroughputDescription.Builder#build()} is called * immediately and its result is passed to {@link #provisionedThroughput(ProvisionedThroughputDescription)}. * * @param provisionedThroughput * a consumer that will call methods on {@link ProvisionedThroughputDescription.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #provisionedThroughput(ProvisionedThroughputDescription) */ default Builder provisionedThroughput(Consumer<ProvisionedThroughputDescription.Builder> provisionedThroughput) { return provisionedThroughput(ProvisionedThroughputDescription.builder().applyMutation(provisionedThroughput).build()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ProvisionedThroughputDescription)) { return false; } ProvisionedThroughputDescription other = (ProvisionedThroughputDescription) obj; return Objects.equals(lastIncreaseDateTime(), other.lastIncreaseDateTime()) && Objects.equals(lastDecreaseDateTime(), other.lastDecreaseDateTime()) && Objects.equals(numberOfDecreasesToday(), other.numberOfDecreasesToday()) && Objects.equals(readCapacityUnits(), other.readCapacityUnits()) && Objects.equals(writeCapacityUnits(), other.writeCapacityUnits()); }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "LastIncreaseDateTime": return Optional.ofNullable(clazz.cast(lastIncreaseDateTime())); case "LastDecreaseDateTime": return Optional.ofNullable(clazz.cast(lastDecreaseDateTime())); case "NumberOfDecreasesToday": return Optional.ofNullable(clazz.cast(numberOfDecreasesToday())); case "ReadCapacityUnits": return Optional.ofNullable(clazz.cast(readCapacityUnits())); case "WriteCapacityUnits": return Optional.ofNullable(clazz.cast(writeCapacityUnits())); default: return Optional.empty(); } }