com.amazonaws.services.dynamodbv2.datamodeling
Enum DynamoDBMapperConfig.PaginationLoadingStrategy

java.lang.Object
  extended by java.lang.Enum<DynamoDBMapperConfig.PaginationLoadingStrategy>
      extended by com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapperConfig.PaginationLoadingStrategy
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DynamoDBMapperConfig.PaginationLoadingStrategy>
Enclosing class:
DynamoDBMapperConfig

public static enum DynamoDBMapperConfig.PaginationLoadingStrategy
extends java.lang.Enum<DynamoDBMapperConfig.PaginationLoadingStrategy>

Enumeration of pagination loading strategy.


Enum Constant Summary
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
static DynamoDBMapperConfig.PaginationLoadingStrategy valueOf(java.lang.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.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.