Enum DynamoDBMapperConfig.PaginationLoadingStrategy
- java.lang.Object
-
- java.lang.Enum<DynamoDBMapperConfig.PaginationLoadingStrategy>
-
- com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapperConfig.PaginationLoadingStrategy
-
- All Implemented Interfaces:
Serializable
,Comparable<DynamoDBMapperConfig.PaginationLoadingStrategy>
- Enclosing class:
- DynamoDBMapperConfig
public static enum DynamoDBMapperConfig.PaginationLoadingStrategy extends Enum<DynamoDBMapperConfig.PaginationLoadingStrategy>
Enumeration of pagination loading strategy.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EAGER_LOADING
Paginated list will eagerly load all the paginated results from DynamoDB as soon as the list is initialized.ITERATION_ONLY
Only supports using iterator to read from the paginated list.LAZY_LOADING
Paginated list is lazily loaded when possible, and all loaded results are kept in the memory.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DynamoDBMapperConfig.PaginationLoadingStrategy
valueOf(String name)
Returns the enum constant of this type with the specified name.static DynamoDBMapperConfig.PaginationLoadingStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LAZY_LOADING
public static final DynamoDBMapperConfig.PaginationLoadingStrategy LAZY_LOADING
Paginated list is lazily loaded when possible, and all loaded results are kept in the memory.By default, the mapper uses LAZY_LOADING.
-
ITERATION_ONLY
public static final DynamoDBMapperConfig.PaginationLoadingStrategy ITERATION_ONLY
Only supports using iterator to read from the paginated list. All other list operations will return UnsupportedOperationException immediately. During the iteration, the list will clear all the previous results before loading the next page, so that the list will keep at most one page of the loaded results in memory. This also means the list could only be iterated once.Use this configuration to reduce the memory overhead when handling large DynamoDB items.
-
EAGER_LOADING
public static final DynamoDBMapperConfig.PaginationLoadingStrategy EAGER_LOADING
Paginated list will eagerly load all the paginated results from DynamoDB as soon as the list is initialized.
-
-
Method Detail
-
values
public static DynamoDBMapperConfig.PaginationLoadingStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DynamoDBMapperConfig.PaginationLoadingStrategy c : DynamoDBMapperConfig.PaginationLoadingStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DynamoDBMapperConfig.PaginationLoadingStrategy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-