|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapperConfig
public class DynamoDBMapperConfig
Immutable configuration object for service call behavior. An instance of this
configuration is supplied to every DynamoDBMapper
at construction; if
not provided explicitly, DEFAULT
is used. New
instances can be given to the mapper object on individual save, load, and
delete operations to override the defaults. For example:
DynamoDBMapper mapper = new DynamoDBMapper(dynamoDBClient); // Force this read to be consistent DomainClass obj = mapper.load(DomainClass.class, key, new DynamoDBMapperConfig(ConsistentReads.CONSISTENT)); // Force this save operation to use putItem rather than updateItem mapper.save(obj, new DynamoDBMapperConfig(SaveBehavior.CLOBBER)); // Save the object into a different table mapper.save(obj, new DynamoDBMapperConfig(new TableNameOverride("AnotherTable"))); // Delete the object even if the version field is out of date mapper.delete(obj, new DynamoDBMapperConfig(SaveBehavior.CLOBBER));
Nested Class Summary | |
---|---|
static class |
DynamoDBMapperConfig.ConsistentReads
Deprecated. Enumeration of consistent read behavior. |
static class |
DynamoDBMapperConfig.PaginationLoadingStrategy
Deprecated. Enumeration of pagination loading strategy. |
static class |
DynamoDBMapperConfig.SaveBehavior
Deprecated. Enumeration of behaviors for the save operation. |
static class |
DynamoDBMapperConfig.TableNameOverride
Deprecated. Allows overriding the table name declared on a domain class by the DynamoDBTable annotation. |
Field Summary | |
---|---|
static DynamoDBMapperConfig |
DEFAULT
Deprecated. Default configuration uses UPDATE behavior for saves and EVENTUALly consistent reads, with no table name override and lazy-loading strategy. |
Constructor Summary | |
---|---|
DynamoDBMapperConfig(DynamoDBMapperConfig.ConsistentReads consistentReads)
Deprecated. Constructs a new configuration object with the consistent read behavior given. |
|
DynamoDBMapperConfig(DynamoDBMapperConfig.PaginationLoadingStrategy paginationLoadingStrategy)
Deprecated. Constructs a new configuration object with the pagination loading strategy given. |
|
DynamoDBMapperConfig(DynamoDBMapperConfig.SaveBehavior saveBehavior)
Deprecated. Constructs a new configuration object with the save behavior given. |
|
DynamoDBMapperConfig(DynamoDBMapperConfig.SaveBehavior saveBehavior,
DynamoDBMapperConfig.ConsistentReads consistentReads,
DynamoDBMapperConfig.TableNameOverride tableNameOverride)
Deprecated. Legacy constructor, using default PaginationLoadingStrategy |
|
DynamoDBMapperConfig(DynamoDBMapperConfig.SaveBehavior saveBehavior,
DynamoDBMapperConfig.ConsistentReads consistentReads,
DynamoDBMapperConfig.TableNameOverride tableNameOverride,
DynamoDBMapperConfig.PaginationLoadingStrategy paginationLoadingStrategy)
Deprecated. Constructs a new configuration object with the save behavior, consistent read behavior, and table name override given. |
|
DynamoDBMapperConfig(DynamoDBMapperConfig.SaveBehavior saveBehavior,
DynamoDBMapperConfig.ConsistentReads consistentReads,
DynamoDBMapperConfig.TableNameOverride tableNameOverride,
DynamoDBMapperConfig.PaginationLoadingStrategy paginationLoadingStrategy,
RequestMetricCollector requestMetricCollector)
Deprecated. Constructs a new configuration object with the save behavior, consistent read behavior, and table name override given. |
|
DynamoDBMapperConfig(DynamoDBMapperConfig.TableNameOverride tableNameOverride)
Deprecated. Constructs a new configuration object with the table name override given. |
Method Summary | |
---|---|
DynamoDBMapperConfig.ConsistentReads |
getConsistentReads()
Deprecated. Returns the consistent read behavior for this configuration. |
DynamoDBMapperConfig.PaginationLoadingStrategy |
getPaginationLoadingStrategy()
Deprecated. Returns the pagination loading strategy for this configuration. |
RequestMetricCollector |
getRequestMetricCollector()
Deprecated. Returns the request metric collector or null if not specified. |
DynamoDBMapperConfig.SaveBehavior |
getSaveBehavior()
Deprecated. Returns the save behavior for this configuration. |
DynamoDBMapperConfig.TableNameOverride |
getTableNameOverride()
Deprecated. Returns the table name override for this configuration. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final DynamoDBMapperConfig DEFAULT
Constructor Detail |
---|
public DynamoDBMapperConfig(DynamoDBMapperConfig.SaveBehavior saveBehavior, DynamoDBMapperConfig.ConsistentReads consistentReads, DynamoDBMapperConfig.TableNameOverride tableNameOverride)
public DynamoDBMapperConfig(DynamoDBMapperConfig.SaveBehavior saveBehavior, DynamoDBMapperConfig.ConsistentReads consistentReads, DynamoDBMapperConfig.TableNameOverride tableNameOverride, DynamoDBMapperConfig.PaginationLoadingStrategy paginationLoadingStrategy)
saveBehavior
- The DynamoDBMapperConfig.SaveBehavior
to use, or null for default.consistentReads
- The DynamoDBMapperConfig.ConsistentReads
to use, or null for default.tableNameOverride
- An override for the table name, or null for no override.paginationLoadingStrategy
- The pagination loading strategy, or null for default.public DynamoDBMapperConfig(DynamoDBMapperConfig.SaveBehavior saveBehavior, DynamoDBMapperConfig.ConsistentReads consistentReads, DynamoDBMapperConfig.TableNameOverride tableNameOverride, DynamoDBMapperConfig.PaginationLoadingStrategy paginationLoadingStrategy, RequestMetricCollector requestMetricCollector)
saveBehavior
- The DynamoDBMapperConfig.SaveBehavior
to use, or null for default.consistentReads
- The DynamoDBMapperConfig.ConsistentReads
to use, or null for default.tableNameOverride
- An override for the table name, or null for no override.paginationLoadingStrategy
- The pagination loading strategy, or null for default.requestMetricCollector
- optional request metric collectorpublic DynamoDBMapperConfig(DynamoDBMapperConfig.SaveBehavior saveBehavior)
public DynamoDBMapperConfig(DynamoDBMapperConfig.ConsistentReads consistentReads)
public DynamoDBMapperConfig(DynamoDBMapperConfig.TableNameOverride tableNameOverride)
public DynamoDBMapperConfig(DynamoDBMapperConfig.PaginationLoadingStrategy paginationLoadingStrategy)
Method Detail |
---|
public DynamoDBMapperConfig.SaveBehavior getSaveBehavior()
public DynamoDBMapperConfig.ConsistentReads getConsistentReads()
public DynamoDBMapperConfig.TableNameOverride getTableNameOverride()
DynamoDBTable
annotation,
either by replacing the table name entirely or else by pre-pending a
string to each table name. This is useful for partitioning data in
multiple tables at runtime.
DynamoDBMapperConfig.TableNameOverride.withTableNamePrefix(String)
,
DynamoDBMapperConfig.TableNameOverride.withTableNameReplacement(String)
public DynamoDBMapperConfig.PaginationLoadingStrategy getPaginationLoadingStrategy()
public RequestMetricCollector getRequestMetricCollector()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |