public class DynamoDB extends java.lang.Object implements ListTablesApi, BatchGetItemApi, BatchWriteItemApi
Modifier and Type | Field and Description |
---|---|
private BatchGetItemImpl |
batchGetItemDelegate |
private BatchWriteItemImpl |
batchWriteItemDelegate |
private AmazonDynamoDB |
client |
private ListTablesImpl |
listTablesDelegate |
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(java.util.Map<java.lang.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,
java.util.Map<java.lang.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(java.util.Map<java.lang.String,java.util.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(java.lang.String tableName,
java.util.List<KeySchemaElement> keySchema,
java.util.List<AttributeDefinition> attributeDefinitions,
ProvisionedThroughput provisionedThroughput)
Creates the specified table in DynamoDB.
|
Table |
getTable(java.lang.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(java.lang.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(java.lang.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.
|
private final AmazonDynamoDB client
private final ListTablesImpl listTablesDelegate
private final BatchGetItemImpl batchGetItemDelegate
private final BatchWriteItemImpl batchWriteItemDelegate
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(java.lang.String tableName)
public Table createTable(CreateTableRequest req)
public Table createTable(java.lang.String tableName, java.util.List<KeySchemaElement> keySchema, java.util.List<AttributeDefinition> attributeDefinitions, ProvisionedThroughput provisionedThroughput)
public TableCollection<ListTablesResult> listTables()
ListTablesApi
listTables
in interface ListTablesApi
public TableCollection<ListTablesResult> listTables(java.lang.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(java.lang.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, java.util.Map<java.lang.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(java.util.Map<java.lang.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(java.util.Map<java.lang.String,java.util.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()