Package com.amazonaws.services.simpledb.model

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


  @Override
  public void releaseAcquiredTrigger(SchedulingContext ctxt, Trigger trigger) {
    log.debug("Releasing Trigger: " + trigger.getFullName());
    String key = TriggerWrapper.getTriggerNameKey(trigger);
    GetAttributesResult result = amazonSimpleDb
        .getAttributes(new GetAttributesRequest(triggerDomain, key)
            .withConsistentRead(new Boolean(true)));
    TriggerWrapper tw = null;
    try {
      tw = triggerFromAttributes(result.getAttributes());
      if (tw.state == TriggerWrapper.STATE_ACQUIRED) {
View Full Code Here


      Trigger trigger) {

    log.debug("Fired Trigger: " + trigger.getFullName());
    String key = TriggerWrapper.getTriggerNameKey(trigger);
    GetAttributesResult result = amazonSimpleDb
        .getAttributes(new GetAttributesRequest(triggerDomain, key)
            .withConsistentRead(new Boolean(true)));
    TriggerWrapper tw = null;
    try {
      tw = triggerFromAttributes(result.getAttributes());
    } catch (Exception e) {
View Full Code Here

    log.debug("Completing Job: " + trigger.getFullName());

    String jobKey = JobWrapper.getJobNameKey(jobDetail.getName(),
        jobDetail.getGroup());
    GetAttributesResult jobresult = amazonSimpleDb
        .getAttributes(new GetAttributesRequest(jobDomain, jobKey)
            .withConsistentRead(new Boolean(true)));
    JobDetail job = null;
    try {
      job = jobDetailFromAttributes(jobresult.getAttributes());
      if (job.isStateful()) {
        // TODO: Implement support for stateful jobs
      }
    } catch (Exception e) {
      log.error(
          "Could not complete job for Trigger: "
              + trigger.getFullName(), e);
    }

    String triggerKey = TriggerWrapper.getTriggerNameKey(trigger);
    GetAttributesResult result = amazonSimpleDb
        .getAttributes(new GetAttributesRequest(triggerDomain,
            triggerKey).withConsistentRead(new Boolean(true)));
    TriggerWrapper tw = null;

    try {
      tw = triggerFromAttributes(result.getAttributes());
View Full Code Here

    }

    private void putAndDelete(String domainName, String oldAttributeName, String newAttributeName, List<Item> items) throws AmazonClientException {
        AmazonSimpleDB db = factory.getSimpleDb();
        for (Item item : items) {
            GetAttributesResult getOldResults = db.getAttributes(new GetAttributesRequest().withDomainName(domainName).withConsistentRead(true).withItemName(
                    item.getName()).withAttributeNames(oldAttributeName));

            List<Attribute> oldAtts = getOldResults.getAttributes();
            if (oldAtts.size() > 0) {
                Attribute oldAtt = oldAtts.get(0);
View Full Code Here

            throw new IllegalArgumentException("Id cannot be null.");

        String              modelName = jsoda.getModelName(modelClass);
        String              table = jsoda.getModelTable(modelName);
        String              idValue = makeIdValue(modelName, id, rangeKey);
        GetAttributesResult result = sdbClient.getAttributes(new GetAttributesRequest(table, idValue));
        if (result.getAttributes().size() == 0)
            return null;        // not existed.
        return buildLoadObj(modelClass, modelName, idValue, result.getAttributes(), null);
       
    }
View Full Code Here

    }

    private void putAndDelete(String domainName, String oldAttributeName, String newAttributeName, List<Item> items) throws AmazonClientException {
        AmazonSimpleDB db = factory.getSimpleDb();
        for (Item item : items) {
            GetAttributesResult getOldResults = db.getAttributes(new GetAttributesRequest().withDomainName(domainName).withConsistentRead(true).withItemName(
                    item.getName()).withAttributeNames(oldAttributeName));

            List<Attribute> oldAtts = getOldResults.getAttributes();
            if (oldAtts.size() > 0) {
                Attribute oldAtt = oldAtts.get(0);
View Full Code Here

     * @return
     * @throws AmazonClientException
     */
    public static Item findItemById(AmazonSimpleDB db, String domainName, String itemName, boolean consistentRead) throws AmazonClientException {

        GetAttributesResult results = db.getAttributes(new GetAttributesRequest()
            .withConsistentRead(consistentRead)
            .withDomainName(domainName)
            .withItemName(itemName));
       
        if(results.getAttributes().size() == 0) {
View Full Code Here

    }

    private void putAndDelete(String domainName, String oldAttributeName, String newAttributeName, List<Item> items) throws AmazonClientException {
        AmazonSimpleDB db = factory.getSimpleDb();
        for (Item item : items) {
            GetAttributesResult getOldResults = db.getAttributes(new GetAttributesRequest().withDomainName(domainName).withConsistentRead(true).withItemName(
                    item.getName()).withAttributeNames(oldAttributeName));

            List<Attribute> oldAtts = getOldResults.getAttributes();
            if (oldAtts.size() > 0) {
                Attribute oldAtt = oldAtts.get(0);
View Full Code Here

  public JobDetail retrieveJob(SchedulingContext ctxt, String jobName,
      String groupName) {
    logDebug("Retrieving Job: ", groupName, ".", jobName);
    String key = JobWrapper.getJobNameKey(jobName, groupName);
    GetAttributesResult result = amazonSimpleDb
        .getAttributes(new GetAttributesRequest(jobDomain, key)
            .withConsistentRead(new Boolean(true)));
    JobDetail job = null;
    try {
      job = jobDetailFromAttributes(result.getAttributes());
    } catch (Exception e) {
View Full Code Here

  public Trigger retrieveTrigger(SchedulingContext ctxt, String triggerName,
      String groupName) {
    logDebug("Retrieving Trigger: ", triggerName, ".", groupName);
    String key = TriggerWrapper.getTriggerNameKey(triggerName, groupName);
    GetAttributesResult result = amazonSimpleDb
        .getAttributes(new GetAttributesRequest(triggerDomain, key)
            .withConsistentRead(new Boolean(true)));
    TriggerWrapper tw = null;
    try {
      tw = triggerFromAttributes(result.getAttributes());
      return tw.trigger;
View Full Code Here

TOP

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

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.