public class Tables extends Object
if (Tables.doesTableExist(dynamoDB, myTableName) == false) {
// ... create your table ...
Tables.awaitTableToBecomeActive(dynamoDB, myTableName);
}
| Constructor and Description |
|---|
Tables() |
| Modifier and Type | Method and Description |
|---|---|
static void |
awaitTableToBecomeActive(AmazonDynamoDB dynamo,
String tableName)
Waits up to 10 minutes for a specified AWS DynamoDB table to move into
the
ACTIVE state. |
static void |
awaitTableToBecomeActive(AmazonDynamoDB dynamo,
String tableName,
int timeout,
int interval)
Waits up to a specified amount of time for a specified AWS DynamoDB
table to move into the
ACTIVE state. |
static boolean |
doesTableExist(AmazonDynamoDB dynamo,
String tableName)
Checks if a specified table exists and is in
ACTIVE state. |
static void |
waitForTableToBecomeActive(AmazonDynamoDB dynamo,
String tableName)
Deprecated.
|
static void |
waitForTableToBecomeActive(AmazonDynamoDB dynamo,
String tableName,
int timeout,
int interval)
Deprecated.
|
public static boolean doesTableExist(AmazonDynamoDB dynamo, String tableName)
ACTIVE state.dynamo - The AWS DynamoDB client to use to make requests.tableName - The name of the table being searched for.@Deprecated public static void waitForTableToBecomeActive(AmazonDynamoDB dynamo, String tableName)
awaitTableToBecomeActive(AmazonDynamoDB, String).ACTIVE state. If the table doesn't transition to the
ACTIVE state, then an AmazonClientException is thrown.dynamo - The AWS DynamoDB client to use to make requests.tableName - The name of the table whose status is being checked.AmazonClientException - If the specified table does not transition into the
ACTIVE state before this method times out and
stops polling.public static void awaitTableToBecomeActive(AmazonDynamoDB dynamo, String tableName) throws InterruptedException
ACTIVE state. If the table doesn't transition to the
ACTIVE state, then an AmazonClientException is thrown.dynamo - The AWS DynamoDB client to use to make requests.tableName - The name of the table whose status is being checked.AmazonClientException - If the specified table does not transition into the
ACTIVE state before this method times out and
stops polling.InterruptedException - If the thread is interrupted while waiting for the table to
transition into the ACTIVE state.@Deprecated public static void waitForTableToBecomeActive(AmazonDynamoDB dynamo, String tableName, int timeout, int interval)
awaitTableToBecomeActive(AmazonDynamoDB, String, int, int).ACTIVE state. If the table doesn't
transition to the ACTIVE state, then an
AmazonClientException is thrown.dynamo - The AWS DynamoDB client to use to make requests.tableName - The name of the table whose status is being checked.timeout - The maximum number of milliseconds to wait.interval - The poll interval in milliseconds.AmazonClientException - If the specified table does not transition into the
ACTIVE state before this method times out and
stops polling.public static void awaitTableToBecomeActive(AmazonDynamoDB dynamo, String tableName, int timeout, int interval) throws InterruptedException
ACTIVE state. If the table doesn't
transition to the ACTIVE state, then an
AmazonClientException is thrown.dynamo - The AWS DynamoDB client to use to make requests.tableName - The name of the table whose status is being checked.timeout - The maximum number of milliseconds to wait.interval - The poll interval in milliseconds.AmazonClientException - If the specified table does not transition into the
ACTIVE state before this method times out and
stops polling.InterruptedException - If the thread is interrupted while waiting for the table to
transition into the ACTIVE state.Copyright © 2015. All rights reserved.