예제 #1
0
 /**
  * Deletes the table and ignores any errors if it doesn't exist.
  *
  * @param dynamo The Dynamo client to use.
  * @param deleteTableRequest The delete table request.
  * @return True if deleted, false otherwise.
  */
 public static final boolean deleteTableIfExists(
     final AmazonDynamoDB dynamo, final DeleteTableRequest deleteTableRequest) {
   try {
     dynamo.deleteTable(deleteTableRequest);
     return true;
   } catch (final ResourceNotFoundException e) {
     if (LOG.isTraceEnabled()) {
       LOG.trace("Table " + deleteTableRequest.getTableName() + " does not exist", e);
     }
   }
   return false;
 }