Examples of Chore


Examples of com.acelet.s.chore.Chore

   
    long now = System.currentTimeMillis();
    Enumeration enumeration = Registry.choreHashtable.elements();
    while (enumeration.hasMoreElements()) {
      Chore chore = (Chore) enumeration.nextElement();
      long duration = chore.duration;
      WorkingChore workingChore = null;
      if (chore.duration > 0) {
       
       
        for (int i = 0; i < Registry.workingChoreVector.size(); i++) {
          workingChore = (WorkingChore) Registry.workingChoreVector.elementAt(i);
          if (chore.getId() == workingChore.getId0()) {
            if (workingChore.status == WorkingChore.STATUS_STARTED) {
             
             
             
             
View Full Code Here

Examples of com.acelet.s.chore.Chore

      }
    }
  }

  public static void executeNow(String name) throws Exception {
    Chore chore = Delegate.selectChore(name);
    Chore tmpChore = chore.createTemporaryCopyForNow();
    WatchTimerTask.createExecutorTimerTask(tmpChore, null);
  }
View Full Code Here

Examples of com.acelet.s.chore.Chore

  private static void processChore(Chore comingChore) throws Exception {
    if (isDoer == false)
      return;

    Long comingId = new Long(comingChore.getId());
    Chore existingChore = (Chore) Registry.choreHashtable.get(comingId);
    if (existingChore == null) { 
      WatchTimerTask.createWatchTimerTask(comingChore);
    } else
      if (!existingChore.equals(comingChore)) {
        updateTimerTask(comingChore)
      }
    }
  }
View Full Code Here

Examples of com.acelet.s.chore.Chore

        return;
     
      Vector allComingChores = Delegate.selectAllChores();
      int choreSize = allComingChores.size();
      for (int i = 0; i < choreSize; i++) {
        Chore comingChore = (Chore) allComingChores.elementAt(i);
        Long comingChoreId = new Long(comingChore.getId());
        try {
          processChore(comingChore);
        } catch (Exception ex) {
          if (comingChore.status != Chore.STATUS_ERROR) {
           
View Full Code Here

Examples of com.acelet.s.chore.Chore

    Vector allCandidateChores = Delegate.selectAllCandidateChores();
    for (int i = 0; i < allCandidateChores.size(); i++) {
      try {
        CandidateChore candidateChore =
          (CandidateChore) allCandidateChores.elementAt(i);
        Chore originalChore = Delegate.selectChore(candidateChore.name);
        if (originalChore == null) {
          Delegate.deleteCandidateChore(candidateChore.id);
          String message = Phrase.get("ER_CANNOT_FIND_TASK") + ": " + candidateChore.name +
            ". " + Phrase.get("TX_REQUEST_IS_DELETED");
          Delegate.sendAlarmEmailForChoreError(originalChore.alarmEmail,
View Full Code Here

Examples of com.acelet.s.chore.Chore

  protected boolean prepareData() throws Exception {
    if (isCallerSuperWatchdog) {
      Vector allComingChores = com.acelet.s.watchdog.Delegate.selectAllChores();
      int choreSize = allComingChores.size();
      for (int i = 0; i < choreSize; i++) {
        Chore chore = (Chore) allComingChores.elementAt(i);
        String choreName = chore.name;
        String brief = chore.getBrief();
        String description = chore.description;
       
        Vector rowVector = new Vector();
        rowVector.add(choreName);
        rowVector.add(brief);
View Full Code Here

Examples of org.apache.hadoop.hbase.Chore

  private static Thread getAndStartBalancerChore(final HMaster master) {
    String name = master.getServerName() + "-BalancerChore";
    int balancerPeriod =
      master.getConfiguration().getInt("hbase.balancer.period", 300000);
    // Start up the load balancer chore
    Chore chore = new Chore(name, balancerPeriod, master) {
      @Override
      protected void chore() {
        master.balance();
      }
    };
    return Threads.setDaemonThreadRunning(chore.getThread());
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.Chore

  private static Thread getAndStartBalancerChore(final HMaster master) {
    String name = master.getServerName() + "-BalancerChore";
    int balancerPeriod =
      master.getConfiguration().getInt("hbase.balancer.period", 300000);
    // Start up the load balancer chore
    Chore chore = new Chore(name, balancerPeriod, master) {
      @Override
      protected void chore() {
        master.balance();
      }
    };
    return Threads.setDaemonThreadRunning(chore.getThread());
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.Chore

  private static Thread getAndStartClusterStatusChore(HMaster master) {
    if (master == null || master.balancer == null) {
      return null;
    }
    Chore chore = new ClusterStatusChore(master, master.balancer);
    return Threads.setDaemonThreadRunning(chore.getThread());
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.Chore

    return Threads.setDaemonThreadRunning(chore.getThread());
  }

  private static Thread getAndStartBalancerChore(final HMaster master) {
    // Start up the load balancer chore
    Chore chore = new BalancerChore(master);
    return Threads.setDaemonThreadRunning(chore.getThread());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.