|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
The AWS SDK for Java provides an API for the Amazon DynamoDB item and table operations. The API gives you the option of using a low-level or high-level API.
The low-level APIs correspond closely to the underlying Amazon DynamoDB operations. The low-level API allows you to perform the same operations that you can perform using Amazon DynamoDB operations such as create, update, and delete tables, and create, read, update, and delete items.
The high-level API uses Object Persistence programming techniques to map Java objects to Amazon DynamoDB tables and attributes. You cannot create tables using the high-level API, but you can create, read, update, and delete table items. You can use the high-level API if you have an existing code-base that you want to leverage by mapping to Amazon DynamoDB tables.
The low-level API and high-level API provide thread-safe clients for accessing Amazon DynamoDB. As a best practice, your applications should create one client and reuse the client between threads.
The following packages in the AWS SDK for Java provide the API:
com.amazonaws.services.dynamodbv2—Provides the implementation APIs for Amazon DynamoDB item and table operations.
For example, it provides methods to create, update, and delete tables, and create, upload, read, and delete table items.
com.amazonaws.services.dynamodbv2.model—Provides the low-level API classes to create requests and process responses.
For example, it includes the
GetItemRequest class to
describe your get item request, the
to describe your item put requests, and the
to describe your item delete request.
com.amazonaws.services.dynamodbv2.datamodeling—Provides the high-level API operations.
The high-level API allows you to use Object Persistence programming
techniques to map Java objects to Amazon DynamoDB tables and perform create,
read, update, and delete actions on your table items. The high-level API
DynamoDBMapper, which is an object mapper class that
you use to map between your Java classes and your tables in Amazon DynamoDB.
For more information about the AWS SDK for Java API, go to the AWS SDK for Java API Reference.
Choosing a JVM
For the best performance of your server-based applications with the AWS SDK for Java, we recommend that you use the 64-bit version of the Java Virtual Machine (JVM). This JVM runs only in Server mode, even if you specify the
-Client option at run time. Using the 32-bit version of the JVM with the
-Server option at run time should provide comparable performance to the 64-bit JVM.