Examples of RunnableClock


Examples of com.almende.eve.clock.RunnableClock

    myAgent = factory.getAgent(agentId);
    if (myAgent == null) {
      Logger.getLogger("ClockScheduler").severe(
          "Error: Agent not found:" + agentId);
    }
    myClock = new RunnableClock();
    TaskEntry task = getFirstTask(false);
    if (task != null)
      myClock.requestTrigger(agentId, task.due, this);
  }
View Full Code Here

Examples of com.almende.eve.clock.RunnableClock

          "Error: Agent not found:" + agentId);
      throw new Exception(
          "Trying to getScheduler() on a not existing agent:"
              + agentId);
    }
    myClock = new RunnableClock();
    run();
  }
View Full Code Here

Examples of com.almende.eve.scheduler.clock.RunnableClock

  private static final TypedKey<TreeSet<TaskEntry>> TYPEDKEY = new TypedKey<TreeSet<TaskEntry>>("_taskList"){};
  private static final int     MAXCOUNT    = 1000;
 
  public ClockScheduler(Agent myAgent, AgentHost factory) {
    this.myAgent = myAgent;
    myClock = new RunnableClock();
  }
View Full Code Here

Examples of com.almende.eve.scheduler.clock.RunnableClock

  public ClockScheduler(final AgentInterface myAgent, final AgentHost host) {
    if (myAgent == null) {
      throw new IllegalArgumentException("MyAgent should not be null!");
    }
    this.myAgent = myAgent;
    myClock = new RunnableClock();
  }
View Full Code Here

Examples of com.almende.eve.scheduling.clock.RunnableClock

      final Handler<Receiver> handle) {
    super(params, handle);
    final PersistentSchedulerConfig config = new PersistentSchedulerConfig(
        params);
    if (getClock() == null) {
      setClock(new RunnableClock());
    }
   
    final ObjectNode stateConfig = config.getState();
    if (stateConfig == null) {
      LOG.warning("Parameter 'state' is required, falling back to SimpleScheduler.");
View Full Code Here

Examples of com.almende.eve.scheduling.clock.RunnableClock

  }
 
  private void run(final TaskEntry entry) {
    if (entry != null) {
      if (getClock() == null) {
        setClock(new RunnableClock());
      }
      getClock().requestTrigger(entry.getTaskId(), entry.getDue(),
          new Runnable() {
           
            @Override
View Full Code Here

Examples of com.almende.eve.scheduling.clock.RunnableClock

   * @see com.almende.eve.scheduling.SimpleScheduler#cancel(java.lang.String)
   */
  @Override
  public void cancel(final String id) {
    if (getClock() == null) {
      setClock(new RunnableClock());
    }
    if (state != null) {
      state.remove(id);
    }
    getClock().cancel(id);
View Full Code Here

Examples of com.almende.eve.scheduling.clock.RunnableClock

   * @see com.almende.eve.scheduling.SimpleScheduler#clear()
   */
  @Override
  public void clear() {
    if (getClock() == null) {
      setClock(new RunnableClock());
    }
    if (state != null) {
      state.clear();
    }
    getClock().clear();
View Full Code Here

Examples of com.almende.eve.scheduling.clock.RunnableClock

   * org.joda.time.DateTime)
   */
  @Override
  public String schedule(final Object msg, final DateTime due) {
    if (clock == null) {
      clock = new RunnableClock();
    }
    final String uuid = new UUID().toString();
    clock.requestTrigger(uuid, due, new Runnable() {
     
      @Override
View Full Code Here

Examples of com.almende.eve.scheduling.clock.RunnableClock

   * @see com.almende.eve.scheduling.Scheduler#cancel(java.lang.String)
   */
  @Override
  public void cancel(final String id) {
    if (clock == null) {
      clock = new RunnableClock();
      return;
    }
    clock.cancel(id);
  }
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.