List of usage examples for com.amazonaws.services.simpledb AmazonSimpleDB domainMetadata
DomainMetadataResult domainMetadata(DomainMetadataRequest domainMetadataRequest);
Returns information about the domain, including when the domain was created, the number of items and attributes in the domain, and the size of the attribute names and values.
From source file:org.apache.camel.component.aws.sdb.SdbEndpoint.java
License:Apache License
@Override public void doStart() throws Exception { super.doStart(); AmazonSimpleDB sdbClient = getSdbClient(); String domainName = getConfiguration().getDomainName(); LOG.trace("Querying whether domain [{}] already exists...", domainName); try {//from w ww . j a v a 2 s . c om 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); sdbClient.createDomain(new CreateDomainRequest(domainName)); LOG.trace("Domain [{}] created", domainName); } }