Package com.amazonaws.services.dynamodb.model

Examples of com.amazonaws.services.dynamodb.model.DeleteTableResult


   * @param tableName
   */
  public void executeDeleteTableRequest(String pTableName){
    try{
      DeleteTableRequest deleteTableRequest = new DeleteTableRequest().withTableName(pTableName);
      DeleteTableResult result = dynamoDBClient.deleteTable(deleteTableRequest);
      waitForTableToBeDeleted(pTableName);
      LOG.debug("Schema: " + result.getTableDescription() + " deleted successfully.");
    }
    catch(Exception e){
      LOG.debug("Schema: " + pTableName + " deleted.");
      e.printStackTrace();
    }
View Full Code Here


    }

    @Override
    public DeleteTableResult deleteTable(DeleteTableRequest deleteTableRequest) {
        this.deleteTableRequest = deleteTableRequest;
        return new DeleteTableResult().withTableDescription(new TableDescription()
                .withProvisionedThroughput(new ProvisionedThroughputDescription())
                .withTableName(deleteTableRequest.getTableName())
                .withCreationDateTime(new Date(NOW))
                .withItemCount(10L)
                .withKeySchema(new KeySchema())
View Full Code Here

   * @param tableName
   */
  public void executeDeleteTableRequest(String pTableName){
    try{
      DeleteTableRequest deleteTableRequest = new DeleteTableRequest().withTableName(pTableName);
      DeleteTableResult result = dynamoDBClient.deleteTable(deleteTableRequest);
      waitForTableToBeDeleted(pTableName);
      LOG.debug("Schema: " + result.getTableDescription() + " deleted successfully.");
    }
    catch(Exception e){
      LOG.debug("Schema: " + pTableName + " deleted.");
      e.printStackTrace();
    }
View Full Code Here

   * @param tableName
   */
  public void executeDeleteTableRequest(String pTableName){
    try{
      DeleteTableRequest deleteTableRequest = new DeleteTableRequest().withTableName(pTableName);
      DeleteTableResult result = dynamoDBClient.deleteTable(deleteTableRequest);
      waitForTableToBeDeleted(pTableName);
      LOG.debug("Schema: " + result.getTableDescription() + " deleted successfully.");
    }
    catch(Exception e){
      LOG.debug("Schema: " + pTableName + " deleted.");
      e.printStackTrace();
    }
View Full Code Here

    // Delete Table
    Table table = tables.remove(request.getTableName());
    tableList.remove(table);

    return new DeleteTableResult().withTableDescription(table.getTableDescription().withTableStatus(TableStatus.DELETING));
  }
View Full Code Here

  }

  public com.amazonaws.services.dynamodbv2.model.DeleteTableResult deleteTableV2(com.amazonaws.services.dynamodbv2.model.DeleteTableRequest v2Request) throws InternalServerErrorException, ResourceNotFoundException {
        DeleteTableRequest request = AlternatorDBApiVersion2Mapper.MapV2DeleteTableRequestToV1(v2Request);
        try {
            DeleteTableResult result = deleteTable(request);
            return AlternatorDBApiVersion2Mapper.MapV1DeleteTableResultToV2(result);
        } catch (ResourceNotFoundException ex) {
            throw new com.amazonaws.services.dynamodbv2.model.ResourceNotFoundException(ex.getMessage());
        }
  }
View Full Code Here

  @Test
  public void deleteTableWithoutName() {
    String name = createTableName();
    createTable(name);
    try {
      DeleteTableResult res = getClient().deleteTable(new DeleteTableRequest());
      Assert.assertTrue(false);// Should have thrown an exception
    } catch (AmazonServiceException ase) {
    }
    Assert.assertTrue(getClient().listTables().getTableNames().contains(name));
  }
View Full Code Here

TOP

Related Classes of com.amazonaws.services.dynamodb.model.DeleteTableResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.