Examples of ListTablesResult


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

    createTable();
    createTable(name);
    createTable();
    createTable();
    createTable();
    ListTablesResult res = getClient().listTables(new ListTablesRequest().withLimit(10).withExclusiveStartTableName(name));
    Assert.assertTrue(res.getTableNames().contains(name));
    Assert.assertTrue(res.getTableNames().size() == 4);
  }
View Full Code Here

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

  @Test
  public void deleteTableTest() {
    String name = createTableName();
    createTable(name);
    getClient().deleteTable(new DeleteTableRequest(name));
    ListTablesResult res = getClient().listTables();
    Assert.assertFalse(res.getTableNames().contains(name));
    Assert.assertTrue(res.getTableNames().size() == 0);
  }
View Full Code Here

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

  }

  protected void deleteAllTables() {
    String lastTableName = null;
    while (true) {
      ListTablesResult res = getClient().listTables(new ListTablesRequest().withExclusiveStartTableName(lastTableName));
      for (String tableName : res.getTableNames()) {
        getClient().deleteTable(new DeleteTableRequest(tableName));
      }
      lastTableName = res.getLastEvaluatedTableName();
      if (lastTableName == null) {
        break;
      }
    }
  }
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.ListTablesResult

        request.setLimit(InternalUtils.minimum(
                spec.getMaxResultSize(),
                spec.getMaxPageSize()));

        ListTablesResult result = client.listTables(request);
        setLastLowLevelResult(result);
        return new ListTablesPage(client, spec, request, 0, result);
    }
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.ListTablesResult

            if (nextLimit == 0)
                throw new NoSuchElementException("No more pages");
            request.setLimit(nextLimit);
        }
        request.setExclusiveStartTableName(lastEvaluatedKey);
        ListTablesResult result = client.listTables(request);
        final int nextIndex = index + this.size();
        return new ListTablesPage(client, spec, request, nextIndex, result);
    }
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.ListTablesResult

    }

  protected void deleteAllTables() {
    String lastTableName = null;
    while (true) {
      ListTablesResult res = getClient().listTables(new ListTablesRequest().withExclusiveStartTableName(lastTableName));
      for (String tableName : res.getTableNames()) {
        getClient().deleteTable(new DeleteTableRequest(tableName));
      }
      lastTableName = res.getLastEvaluatedTableName();
      if (lastTableName == null) {
        break;
      }
    }
  }
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.ListTablesResult

  @Test
  public void listTables() {
    String name = createTableName();
    createTable(name);
    ListTablesResult res = getClient().listTables();
    Assert.assertTrue(res.getTableNames().contains(name));
  }
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.ListTablesResult

  @Test
  public void listTablesWithLimitOverTableCount() {
    String name = createTableName();
    createTable(name);
    ListTablesResult res = getClient().listTables(new ListTablesRequest().withLimit(5));
    Assert.assertTrue(res.getTableNames().contains(name));
    Assert.assertTrue(res.getTableNames().size() == 1);
  }
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.ListTablesResult

  public void listTablesWithLimitUnderTableCount() {
    String name = createTableName();
    createTable();
    createTable(name);
    createTable();
    ListTablesResult res = getClient().listTables(new ListTablesRequest().withLimit(2));
    Assert.assertTrue(res.getTableNames().contains(name));
    Assert.assertTrue(res.getTableNames().size() == 2);
  }
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.ListTablesResult

  public void listTablesWithExclusiveTableName() {
    String name = createTableName();
    createTable();
    createTable();
    createTable(name);
    ListTablesResult res = getClient().listTables(new ListTablesRequest().withExclusiveStartTableName(name));
    Assert.assertTrue(res.getTableNames().contains(name));
    Assert.assertTrue(res.getTableNames().size() == 1);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.