Examples of ListTablesRequest


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

* Full parameter specification for the ListTables API.
*/
public class ListTablesSpec extends AbstractCollectionSpec<ListTablesRequest> {

    public ListTablesSpec() {
        super(new ListTablesRequest());
    }
View Full Code Here

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

        this.startKey = spec.getExclusiveStartTableName();
    }

    @Override
    public Page<Table, ListTablesResult> firstPage() {
        ListTablesRequest request = spec.getRequest();
        request.setExclusiveStartTableName(startKey);

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

        ListTablesResult result = client.listTables(request);
        setLastLowLevelResult(result);
View Full Code Here

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

                 throw new AmazonClientException("batchGetItem using Map and String is not implemented in Alternator.");
        }

    @Override
  public ListTablesResult listTables() throws AmazonServiceException, AmazonClientException {
    return listTables(new ListTablesRequest());
  }
View Full Code Here

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

                 throw new AmazonClientException("batchGetItem using Map and String is not implemented in Alternator.");
        }

  public ListTablesResult listTables() throws AmazonServiceException, AmazonClientException {
    return handler.listTablesV2(new ListTablesRequest());
  }
View Full Code Here

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

import com.fasterxml.jackson.core.JsonToken;

public class ListTablesRequestJsonUnmarshaller implements Unmarshaller<ListTablesRequest, JsonUnmarshallerContext> {

    public ListTablesRequest unmarshall(JsonUnmarshallerContext context) throws Exception {
        ListTablesRequest request = new ListTablesRequest();

        int originalDepth = context.getCurrentDepth();
        int targetDepth = originalDepth + 1;

        JsonToken token = context.currentToken;
        if (token == null) token = context.nextToken();

        while (true) {
            if (token == null) break;

            if (token == JsonToken.FIELD_NAME || token == JsonToken.START_OBJECT) {
                if (context.testExpression("ExclusiveStartTableName", targetDepth)) {
                    context.nextToken();
                    request.setExclusiveStartTableName(SimpleTypeJsonUnmarshallers.StringJsonUnmarshaller.getInstance().unmarshall(context));
                }
                if (context.testExpression("Limit", targetDepth)) {
                    context.nextToken();
                    request.setLimit(SimpleTypeJsonUnmarshallers.IntegerJsonUnmarshaller.getInstance().unmarshall(context));
                }
            } else if (token == JsonToken.END_ARRAY || token == JsonToken.END_OBJECT) {
                if (context.getCurrentDepth() <= originalDepth) break;
            }
            token = context.nextToken();
View Full Code Here

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

    }

  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) {
View Full Code Here

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

  @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.ListTablesRequest

  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.ListTablesRequest

  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

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

    createTable();
    createTable();
    createTable(name);
    createTable();
    createTable();
    ListTablesResult res = getClient().listTables(new ListTablesRequest().withLimit(1).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.