Package com.amazonaws.services.simpledb.model

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


        AmazonSimpleDB sdbClient = getSdbClient();
        String domainName = getConfiguration().getDomainName();
        LOG.trace("Querying whether domain [{}] already exists...", domainName);

        try {
            sdbClient.domainMetadata(new DomainMetadataRequest(domainName));
            LOG.trace("Domain [{}] already exists", domainName);
            return;
        } catch (NoSuchDomainException ase) {
            LOG.trace("Domain [{}] doesn't exist yet", domainName);
            LOG.trace("Creating domain [{}]...", domainName);
View Full Code Here


        AmazonSimpleDB sdbClient = getSdbClient();
        String domainName = getConfiguration().getDomainName();
        LOG.trace("Querying whether domain [{}] already exists...", domainName);

        try {
            sdbClient.domainMetadata(new DomainMetadataRequest(domainName));
            LOG.trace("Domain [{}] already exists", domainName);
            return;
        } catch (NoSuchDomainException ase) {
            LOG.trace("Domain [{}] doesn't exist yet", domainName);
            LOG.trace("Creating domain [{}]...", domainName);
View Full Code Here

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

    public void execute() {
        DomainMetadataRequest request = new DomainMetadataRequest()
            .withDomainName(determineDomainName());
        log.trace("Sending request [{}] for exchange [{}]...", request, exchange);
       
        DomainMetadataResult result = this.sdbClient.domainMetadata(request);
       
View Full Code Here

        AmazonSimpleDB sdbClient = getSdbClient();
        String domainName = getConfiguration().getDomainName();
        LOG.trace("Querying whether domain [{}] already exists...", domainName);

        try {
            sdbClient.domainMetadata(new DomainMetadataRequest(domainName));
            LOG.trace("Domain [{}] already exists", domainName);
            return;
        } catch (NoSuchDomainException ase) {
            LOG.trace("Domain [{}] doesn't exist yet", domainName);
            LOG.trace("Creating domain [{}]...", domainName);
View Full Code Here

       
        String domainName = getConfiguration().getDomainName();
        LOG.trace("Querying whether domain [{}] already exists...", domainName);

        try {
            sdbClient.domainMetadata(new DomainMetadataRequest(domainName));
            LOG.trace("Domain [{}] already exists", domainName);
            return;
        } catch (NoSuchDomainException ase) {
            LOG.trace("Domain [{}] doesn't exist yet", domainName);
            LOG.trace("Creating domain [{}]...", domainName);
View Full Code Here

            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);
                DomainMetadataResult domainMetadata = sdb.domainMetadata(metadataRequest);
                totalItems += domainMetadata.getItemCount();
            }

            System.out.println("You have " + sdbResult.getDomainNames().size() + " Amazon SimpleDB domain(s)" +
View Full Code Here

       
    }

    private void showDomainMetadata(AmazonSimpleDB sdbService, String domain) {
        // prepare the DomainMetadata request for this domain
        DomainMetadataRequest request = new DomainMetadataRequest(domain);
             
        DomainMetadataResult result = sdbService.domainMetadata(request);
             
        // we are interested in the total amount of items
        long totalItems = result.getItemCount();
View Full Code Here

        // get the SimpleDB service
        AmazonSimpleDB simpleDB = new AmazonSimpleDBClient(credentials);
        // get the metadata for a domain called "my_domain"
        DomainMetadataResult result = simpleDB.domainMetadata(
                new DomainMetadataRequest(Constants.A_SIMPLEDB_DOMAIN));
       
        // number of attributes
        // check if we already have 90% of the maximum number of attributes allowed
        if (result.getAttributeNameCount() > 900000000) {
View Full Code Here

        return Types.VARCHAR; //for now
    }

    public int getColumnCount() throws SQLException {
        return connection.getSimpleDB().domainMetadata(
                new DomainMetadataRequest(domain)).getAttributeNameCount();
    }
View Full Code Here

            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);
                DomainMetadataResult domainMetadata = sdb.domainMetadata(metadataRequest);
                totalItems += domainMetadata.getItemCount();
            }

            System.out.println("You have " + sdbResult.getDomainNames().size() + " Amazon SimpleDB domain(s)" +
View Full Code Here

TOP

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

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.