Make DynamoDBConfiguration more consistent.
This commit is contained in:
parent
3a17a7c98f
commit
1dceee3fa0
|
@ -8,42 +8,36 @@ package org.whispersystems.textsecuregcm.configuration;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotEmpty;
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
|
|
||||||
public class DynamoDbConfiguration {
|
public class DynamoDbConfiguration {
|
||||||
|
|
||||||
@JsonProperty
|
|
||||||
@NotBlank
|
|
||||||
private String region;
|
private String region;
|
||||||
|
|
||||||
@JsonProperty
|
|
||||||
@NotBlank
|
|
||||||
private String tableName;
|
private String tableName;
|
||||||
|
|
||||||
@JsonProperty
|
|
||||||
private Duration clientExecutionTimeout = Duration.ofSeconds(30);
|
private Duration clientExecutionTimeout = Duration.ofSeconds(30);
|
||||||
|
|
||||||
@JsonProperty
|
|
||||||
private Duration clientRequestTimeout = Duration.ofSeconds(10);
|
private Duration clientRequestTimeout = Duration.ofSeconds(10);
|
||||||
|
|
||||||
@Valid
|
@Valid
|
||||||
@NotEmpty
|
@NotEmpty
|
||||||
|
@JsonProperty
|
||||||
public String getRegion() {
|
public String getRegion() {
|
||||||
return region;
|
return region;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Valid
|
@Valid
|
||||||
@NotEmpty
|
@NotEmpty
|
||||||
|
@JsonProperty
|
||||||
public String getTableName() {
|
public String getTableName() {
|
||||||
return tableName;
|
return tableName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonProperty
|
||||||
public Duration getClientExecutionTimeout() {
|
public Duration getClientExecutionTimeout() {
|
||||||
return clientExecutionTimeout;
|
return clientExecutionTimeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonProperty
|
||||||
public Duration getClientRequestTimeout() {
|
public Duration getClientRequestTimeout() {
|
||||||
return clientRequestTimeout;
|
return clientRequestTimeout;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue