code: @Deprecated
      public TableDescription waitForAllActiveOrDelete() throws InterruptedException {
          try {
              retry: for (;;) {
                  TableDescription desc = describe();
                  String status = desc.getTableStatus();
                  if (TableStatus.fromValue(status) == TableStatus.ACTIVE) {
                      List<GlobalSecondaryIndexDescription> descriptions =
                              desc.getGlobalSecondaryIndexes();
                          if (descriptions != null) {
                              for (GlobalSecondaryIndexDescription d: descriptions) {
                                  status = d.getIndexStatus();
                                  if (IndexStatus.fromValue(status) != IndexStatus.ACTIVE) {
                                      // Some index is not active.  Keep waiting.
                                      Thread.sleep(SLEEP_TIME_MILLIS);
                                      continue retry;
                                  }
                              }
                          }
                          return desc;
                  }
                  Thread.sleep(SLEEP_TIME_MILLIS);
                  continue;
              }
          } catch(ResourceNotFoundException deleted) {
          }
          return null;
      }
docs: A convenient blocking call that can be used to wait on a table and all
  it's indexes until both the table and it's indexes have either become
  active or deleted (ie no longer exists) by polling the table every 5
  seconds.
  
  @return the table description if the table and all it's indexes have
  become active; or null if the table has been deleted.
  
  @deprecated If this method is called immediately after
  {@link AmazonDynamoDB#createTable(CreateTableRequest)} or
  {@link AmazonDynamoDB#deleteTable(DeleteTableRequest)} operation,
  the result might be incorrect as all {@link com.amazonaws.services.dynamodbv2.AmazonDynamoDB}
  operations are eventually consistent and might have a few seconds delay before the status is changed.