Package com.amazonaws.services.simpledb.model

Examples of com.amazonaws.services.simpledb.model.ListDomainsRequest


    public ListDomainsCommand(AmazonSimpleDB sdbClient, SdbConfiguration configuration, Exchange exchange) {
        super(sdbClient, configuration, exchange);
    }

    public void execute() {
        ListDomainsRequest request = new ListDomainsRequest()
            .withMaxNumberOfDomains(determineMaxNumberOfDomains())
            .withNextToken(determineNextToken());
        log.trace("Sending request [{}] for exchange [{}]...", request, exchange);
       
        ListDomainsResult result = this.sdbClient.listDomains(request);
View Full Code Here


            logger.info("getting all domains");
            AmazonSimpleDB db = getSimpleDb();
            ListDomainsResult listDomainsResult = db.listDomains();
            domainSet.addAll(listDomainsResult.getDomainNames());
            while (listDomainsResult.getNextToken() != null) {
                ListDomainsRequest request = new ListDomainsRequest().withNextToken(listDomainsResult.getNextToken());
                listDomainsResult = db.listDomains(request);
                domainSet.addAll(listDomainsResult.getDomainNames());
            }
        } catch (AmazonClientException e) {
            throw new PersistenceException(e);
View Full Code Here

         * In this sample, we use a SimpleDB client to iterate over all the
         * domains owned by the current user, and add up the number of items
         * (similar to rows of data in a relational DB) in each domain.
         */
        try {
            ListDomainsRequest sdbRequest = new ListDomainsRequest().withMaxNumberOfDomains(100);
            ListDomainsResult sdbResult = sdb.listDomains(sdbRequest);

            int totalItems = 0;
            for (String domainName : sdbResult.getDomainNames()) {
                DomainMetadataRequest metadataRequest = new DomainMetadataRequest().withDomainName(domainName);
View Full Code Here

    }
  }

  protected boolean exists(final String domainName, final AmazonSimpleDB sdb) {
    try {
      ListDomainsResult listDomainsResult = sdb.listDomains(new ListDomainsRequest());
      List<String> domainNames = listDomainsResult.getDomainNames();
      String nextToken = listDomainsResult.getNextToken();
      while (nextToken != null && !nextToken.isEmpty()) {
        listDomainsResult = sdb.listDomains(new ListDomainsRequest().withNextToken(nextToken));
        domainNames.addAll(listDomainsResult.getDomainNames());
        nextToken = listDomainsResult.getNextToken();
      }
      return domainNames.contains(domainName);
    } catch(AmazonClientException amazonException) {
View Full Code Here

            logger.info("getting all domains");
            AmazonSimpleDB db = getSimpleDb();
            ListDomainsResult listDomainsResult = db.listDomains();
            domainSet.addAll(listDomainsResult.getDomainNames());
            while (listDomainsResult.getNextToken() != null) {
                ListDomainsRequest request = new ListDomainsRequest().withNextToken(listDomainsResult.getNextToken());
                listDomainsResult = db.listDomains(request);
                domainSet.addAll(listDomainsResult.getDomainNames());
            }
        } catch (AmazonClientException e) {
            throw new PersistenceException(e);
View Full Code Here

    ListDomainsResult result = amazonSimpleDb.listDomains();
    List<String> names = result.getDomainNames();
    String nextToken = result.getNextToken();
    while (nextToken != null && !nextToken.isEmpty()) {
      result = amazonSimpleDb.listDomains(new ListDomainsRequest()
          .withNextToken(nextToken));
      names.addAll(result.getDomainNames());
      nextToken = result.getNextToken();
    }
    return names;
View Full Code Here

        // show the items to user...
    }

    private List<String> listDomains(AmazonSimpleDB sdbService) {
        String nextToken = null;
        ListDomainsRequest request = new ListDomainsRequest();

        List<String> domains = new ArrayList<String>();

        // get the existing domains for this region
        do {
            if (nextToken != null) request = request.withNextToken(nextToken);
           
            ListDomainsResult result = sdbService.listDomains(request);
            nextToken = result.getNextToken();
            domains.addAll(result.getDomainNames());
            System.out.println("The existing domains are: " + domains);
View Full Code Here

            logger.info("getting all domains");
            AmazonSimpleDB db = getSimpleDb();
            ListDomainsResult listDomainsResult = db.listDomains();
            domainSet.addAll(listDomainsResult.getDomainNames());
            while (listDomainsResult.getNextToken() != null) {
                ListDomainsRequest request = new ListDomainsRequest().withNextToken(listDomainsResult.getNextToken());
                listDomainsResult = db.listDomains(request);
                domainSet.addAll(listDomainsResult.getDomainNames());
            }
        } catch (AmazonClientException e) {
            throw new PersistenceException(e);
View Full Code Here

         * In this sample, we use a SimpleDB client to iterate over all the
         * domains owned by the current user, and add up the number of items
         * (similar to rows of data in a relational DB) in each domain.
         */
        try {
            ListDomainsRequest sdbRequest = new ListDomainsRequest().withMaxNumberOfDomains(100);
            ListDomainsResult sdbResult = sdb.listDomains(sdbRequest);

            int totalItems = 0;
            for (String domainName : sdbResult.getDomainNames()) {
                DomainMetadataRequest metadataRequest = new DomainMetadataRequest().withDomainName(domainName);
View Full Code Here

TOP

Related Classes of com.amazonaws.services.simpledb.model.ListDomainsRequest

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.