Package com.amazonaws.services.simpledb.model

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


      String groupName) throws JobPersistenceException {
    logDebug("Finding state of Trigger: ", triggerName, ".", groupName);
    String key = TriggerWrapper.getTriggerNameKey(triggerName, groupName);

    TriggerWrapper tw = null;
    GetAttributesResult result = amazonSimpleDb
        .getAttributes(new GetAttributesRequest(triggerDomain, key)
            .withConsistentRead(new Boolean(true)));
    try {
      tw = triggerFromAttributes(result.getAttributes());
    } catch (Exception e) {
      log.error("Error finding state of Trigger: " + triggerName + "."
          + groupName, e);
    }
View Full Code Here


  @Override
  public void pauseTrigger(SchedulingContext ctxt, String triggerName,
      String groupName) {
    logDebug("Pausing 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());
    } catch (Exception e) {
      log.error("Could not create trigger for Item: " + result.toString());
    }

    // does the trigger exist?
    if (tw == null || tw.trigger == null) {
      return;
View Full Code Here

  public void resumeTrigger(SchedulingContext ctxt, String triggerName,
      String groupName) {
    logDebug("Resuming 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());
    } catch (Exception e) {
      log.error("Could not create trigger for Item: " + result.toString());
    }

    // does the trigger exist?
    if (tw == null || tw.trigger == null) {
      return;
View Full Code Here

   */
  @Override
  public void releaseAcquiredTrigger(SchedulingContext ctxt, Trigger trigger) {
    logDebug("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) {
        tw.state = TriggerWrapper.STATE_WAITING;
        updateState(tw);
      }
    } catch (Exception e) {
View Full Code Here

  public TriggerFiredBundle triggerFired(SchedulingContext ctxt,
      Trigger trigger) {

    logDebug("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) {
      log.error("Could not load Trigger: " + trigger.getFullName());
    }

    // was the trigger deleted since being acquired?
View Full Code Here

      JobDetail jobDetail, int triggerInstCode) {
    logDebug("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());
    } catch (Exception e) {
      log.error("Could not find Trigger: " + trigger.getFullName(), e);
    }

    // It's possible that the job is null if:
View Full Code Here

TOP

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

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.