/** * Constructs a new configuration object from two others: a set of defaults * and a set of overrides. Any non-null overrides will be applied to the * defaults. * <p> * Used internally to merge the {@link DynamoDBMapperConfig} provided at * construction with an overriding object for a particular operation. * * @param defaults * The default mapper configuration values. * @param overrides * The overridden mapper configuration values. Any non-null * config settings will be applied to the returned object. * @see DynamoDBMapperConfig#builder() */ @Deprecated public DynamoDBMapperConfig( DynamoDBMapperConfig defaults, DynamoDBMapperConfig overrides) { this(builder().merge(defaults).merge(overrides)); }
/** * Merges these configuration values with the specified overrides; may * simply return this instance if overrides are the same or null. * @param overrides The overrides to merge. * @return This if the overrides are same or null, or a new merged config. */ final DynamoDBMapperConfig merge(final DynamoDBMapperConfig overrides) { return overrides == null || this == overrides ? this : builder().merge(this).merge(overrides).build(); }
private final DynamoDBMapperConfig config = builder().withBatchWriteRetryStrategy(this).build(); public final DynamoDBMapperConfig config() { return this.config;
/** * Constructs a new configuration object from two others: a set of defaults * and a set of overrides. Any non-null overrides will be applied to the * defaults. * <p> * Used internally to merge the {@link DynamoDBMapperConfig} provided at * construction with an overriding object for a particular operation. * * @param defaults * The default mapper configuration values. * @param overrides * The overridden mapper configuration values. Any non-null * config settings will be applied to the returned object. * @see DynamoDBMapperConfig#builder() */ @Deprecated public DynamoDBMapperConfig( DynamoDBMapperConfig defaults, DynamoDBMapperConfig overrides) { this(builder().merge(defaults).merge(overrides)); }
/** * Merges these configuration values with the specified overrides; may * simply return this instance if overrides are the same or null. * @param overrides The overrides to merge. * @return This if the overrides are same or null, or a new merged config. */ final DynamoDBMapperConfig merge(final DynamoDBMapperConfig overrides) { return overrides == null || this == overrides ? this : builder().merge(this).merge(overrides).build(); }
private final DynamoDBMapperConfig config = builder().withBatchWriteRetryStrategy(this).build(); public final DynamoDBMapperConfig config() { return this.config;
DynamoDBMapperConfig.Builder emptyBuilder = DynamoDBMapperConfig.builder(); // empty (!) builder