@ThreadSafe public class DynamoDB extends Object implements ListTablesApi, BatchGetItemApi, BatchWriteItemApi
Constructor and Description |
---|
DynamoDB(AmazonDynamoDB client) |
DynamoDB(Regions regionEnum)
Create a DynamoDB object that talks to the specified AWS region.
|
Modifier and Type | Method and Description |
---|---|
BatchGetItemOutcome |
batchGetItem(BatchGetItemSpec spec)
Used to perform a batch get-item operation from DynamoDB with full
parameter specification.
|
BatchGetItemOutcome |
batchGetItem(ReturnConsumedCapacity returnConsumedCapacity,
TableKeysAndAttributes... tableKeysAndAttributes)
Used to perform a batch get-item operation from DynamoDB.
|
BatchGetItemOutcome |
batchGetItem(TableKeysAndAttributes... tableKeysAndAttributes)
Used to perform a batch get-item operation from DynamoDB.
|
BatchGetItemOutcome |
batchGetItemUnprocessed(Map<String,KeysAndAttributes> unprocessedKeys)
Used to perform a batch get-item for the unprocessed keys returned from a
previous batch get-item operation.
|
BatchGetItemOutcome |
batchGetItemUnprocessed(ReturnConsumedCapacity returnConsumedCapacity,
Map<String,KeysAndAttributes> unprocessedKeys)
Used to perform a batch get-item for the unprocessed keys returned from a
previous batch get-item operation.
|
BatchWriteItemOutcome |
batchWriteItem(BatchWriteItemSpec spec)
Used to perform a batch write operation to DynamoDB with full parameter
specification.
|
BatchWriteItemOutcome |
batchWriteItem(TableWriteItems... tableWriteItems)
Used to perform a batch write operation to DynamoDB.
|
BatchWriteItemOutcome |
batchWriteItemUnprocessed(Map<String,List<WriteRequest>> unprocessedItems)
Used to perform a batch write operation for the unprocessed items
returned from a previous batch write operation.
|
Table |
createTable(CreateTableRequest req)
Creates the specified table in DynamoDB.
|
Table |
createTable(String tableName,
List<KeySchemaElement> keySchema,
List<AttributeDefinition> attributeDefinitions,
ProvisionedThroughput provisionedThroughput)
Creates the specified table in DynamoDB.
|
Table |
getTable(String tableName)
Returns the specified DynamoDB table.
|
TableCollection<ListTablesResult> |
listTables()
Returns a collection of all the tables (initialized with the respective
table names) associated with the current account and endpoint.
|
TableCollection<ListTablesResult> |
listTables(int maxResultSize)
Returns a collection of tables (initialized with the respective table
names) up to the specified
maxResultSize associated with
the current account and endpoint. |
TableCollection<ListTablesResult> |
listTables(ListTablesSpec spec)
List tables by specifying all the details.
|
TableCollection<ListTablesResult> |
listTables(String exclusiveStartTableName)
Returns a collection of tables (initialized with the respective table
names) associated with the current account and endpoint, starting with a
name after the specified
exclusiveStartTableName . |
TableCollection<ListTablesResult> |
listTables(String exclusiveStartTableName,
int maxResultSize)
Returns a collection of tables (initialized with the respective table
names) up to the specified
maxResultSize associated with
the current account and endpoint, starting with a name after the
specified exclusiveStartTableName . |
void |
shutdown()
Shuts down and release all resources.
|
public DynamoDB(AmazonDynamoDB client)
public DynamoDB(Regions regionEnum)
AmazonDynamoDBClient.AmazonDynamoDBClient()
for more information.
If you need more control over the client configuration, use
DynamoDB(AmazonDynamoDB)
instead.
regionEnum
- the AWS region enumAmazonDynamoDBClient.AmazonDynamoDBClient()
public Table getTable(String tableName)
public Table createTable(CreateTableRequest req)
public Table createTable(String tableName, List<KeySchemaElement> keySchema, List<AttributeDefinition> attributeDefinitions, ProvisionedThroughput provisionedThroughput)
public TableCollection<ListTablesResult> listTables()
ListTablesApi
listTables
in interface ListTablesApi
public TableCollection<ListTablesResult> listTables(String exclusiveStartTableName)
ListTablesApi
exclusiveStartTableName
. The
underlying collection is paginated with a page size of 100. A network
call is made whenever the collection is iterated across a page boundary.listTables
in interface ListTablesApi
exclusiveStartTableName
- The first table name that this operation will evaluate,
exclusive of the specified
exclusiveStartTableName
. Use the value that was
returned for LastEvaluatedTableName in a previous
operation, so that you can obtain the next page of results.public TableCollection<ListTablesResult> listTables(String exclusiveStartTableName, int maxResultSize)
ListTablesApi
maxResultSize
associated with
the current account and endpoint, starting with a name after the
specified exclusiveStartTableName
. The underlying collection
is paginated with a page size of 100. A network call is made whenever the
collection is iterated across a page boundary.listTables
in interface ListTablesApi
exclusiveStartTableName
- The first table name that this operation will evaluate
exclusive of the specified
exclusiveStartTableName
. Use the value that was
returned for LastEvaluatedTableName in a previous
operation, so that you can obtain the next page of results.maxResultSize
- A maximum number of table names to return.public TableCollection<ListTablesResult> listTables(int maxResultSize)
ListTablesApi
maxResultSize
associated with
the current account and endpoint. The underlying collection
is paginated with a page size of 100. A network call is made whenever the
collection is iterated across a page boundary.listTables
in interface ListTablesApi
maxResultSize
- A maximum number of table names to return.public TableCollection<ListTablesResult> listTables(ListTablesSpec spec)
ListTablesApi
listTables
in interface ListTablesApi
spec
- can be used to specify all the detailed parameters of listing
tables.public BatchGetItemOutcome batchGetItem(ReturnConsumedCapacity returnConsumedCapacity, TableKeysAndAttributes... tableKeysAndAttributes)
BatchGetItemApi
batchGetItem
in interface BatchGetItemApi
returnConsumedCapacity
- returned capacity to be returnedtableKeysAndAttributes
- the tables, keys, and attributes specification to be used to
retrieve the items.public BatchGetItemOutcome batchGetItem(TableKeysAndAttributes... tableKeysAndAttributes)
BatchGetItemApi
batchGetItem
in interface BatchGetItemApi
tableKeysAndAttributes
- the tables, keys, and attributes specification to be used to
retrieve the items.public BatchGetItemOutcome batchGetItem(BatchGetItemSpec spec)
BatchGetItemApi
batchGetItem
in interface BatchGetItemApi
public BatchGetItemOutcome batchGetItemUnprocessed(ReturnConsumedCapacity returnConsumedCapacity, Map<String,KeysAndAttributes> unprocessedKeys)
BatchGetItemApi
batchGetItemUnprocessed
in interface BatchGetItemApi
returnConsumedCapacity
- returned capacity to be returnedunprocessedKeys
- the unprocessed keys returned from the result of a previous
batch-get-item operation.BatchGetItemOutcome.getUnprocessedKeys()
public BatchGetItemOutcome batchGetItemUnprocessed(Map<String,KeysAndAttributes> unprocessedKeys)
BatchGetItemApi
batchGetItemUnprocessed
in interface BatchGetItemApi
unprocessedKeys
- the unprocessed keys returned from the result of a previous
batch-get-item operation.BatchGetItemOutcome.getUnprocessedKeys()
public BatchWriteItemOutcome batchWriteItem(TableWriteItems... tableWriteItems)
BatchWriteItemApi
batchWriteItem
in interface BatchWriteItemApi
tableWriteItems
- the tables and the respective keys to delete from and/or the
respective items to be put.public BatchWriteItemOutcome batchWriteItem(BatchWriteItemSpec spec)
BatchWriteItemApi
batchWriteItem
in interface BatchWriteItemApi
public BatchWriteItemOutcome batchWriteItemUnprocessed(Map<String,List<WriteRequest>> unprocessedItems)
BatchWriteItemApi
batchWriteItemUnprocessed
in interface BatchWriteItemApi
unprocessedItems
- the unprocessed items returned from the result of a previous
batch write operationBatchWriteItemOutcome.getUnprocessedItems()
public void shutdown()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.