Examples of schedule()


Examples of it.sauronsoftware.cron4j.Scheduler.schedule()

    // Prepares the task.
    MyTask task = new MyTask();
    // Creates the scheduler.
    Scheduler scheduler = new Scheduler();
    // Schedules the task, once every minute.
    scheduler.schedule("* * * * *", task);
    // Starts the scheduler.
    scheduler.start();
    // Stays alive for five minutes.
    try {
      Thread.sleep(5L * 60L * 1000L);
 
View Full Code Here

Examples of it.unibz.instasearch.jobs.CheckUpdatesJob.schedule()

  @Override
  public void run(IAction action)
  {
    Job checkUpdatesJob = new CheckUpdatesJob();
    checkUpdatesJob.setSystem(false);
    checkUpdatesJob.schedule();
  }   
}
View Full Code Here

Examples of it.unibz.instasearch.jobs.DeleteIndexJob.schedule()

    createIndex();
  }
 
  public void deleteIndex() {
    DeleteIndexJob deleteIndexJob = new DeleteIndexJob(indexer);
    deleteIndexJob.schedule();
  }
 
  public boolean isIndexing() {
    if( indexingJob == null )
      return false;
View Full Code Here

Examples of java.util.Timer.schedule()

    if (period > 0) {
      try {
        Timer timer = AgentServer.getTimer();
        if (!schedule) {
          timer.schedule(this, period, period);
          schedule = true;
        }
      } catch (Exception exc) {
        if (logger.isLoggable(BasicLevel.WARN))
          logger.log(BasicLevel.WARN, "--- " + this, exc);
View Full Code Here

Examples of java.util.concurrent.ScheduledExecutorService.schedule()

    }

    private ScheduledFuture<String> scheduleCommit(long delay, final String revisionId) {
        ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
        final MicroKernel mk = this.mk;
        ScheduledFuture<String> future = executorService.schedule(new Callable<String>(){
            @Override
            public String call() throws Exception {
                return mk.commit("/", "+\"b\" : {}", revisionId, null);
            }
        }, delay, TimeUnit.MILLISECONDS);
View Full Code Here

Examples of java.util.concurrent.ScheduledThreadPoolExecutor.schedule()

      build());
    final CountDownLatch latch = new CountDownLatch(1);
    final AtomicInteger highestModificationThreadId = new AtomicInteger(1);
    List<Future<Void>> futures = new LinkedList<Future<Void>>();
    for (int i = 0; i < NUM_THREAD_IDS; i++) {
      futures.add(executor.schedule(new Callable<Void>() {
        @Override
        public Void call() throws Exception {
          latch.await();
          int threadIndex = highestModificationThreadId.addAndGet(1);
          for (int i = 0; i < NUM_KEYS_PER_THREAD; i++) {
View Full Code Here

Examples of javax.enterprise.concurrent.ManagedScheduledExecutorService.schedule()

    public void triggerCallableSchedule() throws Exception {
        final ManagedScheduledExecutorService es = new ManagedScheduledExecutorServiceImplFactory().create();
        final CountDownLatch counter = new CountDownLatch(5);
        final FutureAwareCallable callable = new FutureAwareCallable(counter);

        final Future<Long> future = es.schedule((Callable<Long>) callable,
            new Trigger() {
                @Override
                public Date getNextRunTime(final LastExecution lastExecutionInfo, final Date taskScheduledTime) {
                    if (lastExecutionInfo == null) {
                        return new Date();
View Full Code Here

Examples of lapsePlus.views.LapseView.SlicingFromSinkJob.schedule()

                        // switch to the provenance tracker view
                        lapseView.refresh();
                        lapseView.setFocus();
                       
                        // run the job         
                        job.schedule();
                    } else {
                        MessageDialog.openError(
                            viewer.getControl().getShell(),
                            "Error occurred",
                            "The provenance view is closed. Please open it and try again.");
View Full Code Here

Examples of lineage2.gameserver.ThreadPoolManager.schedule()

      return false;
    }
    else if (type == TYPE_SHEDULED)
    {
      long delay = Long.valueOf(task.getParams()[0]);
      task._scheduled = scheduler.schedule(task, delay);
      return true;
    }
    else if (type == TYPE_FIXED_SHEDULED)
    {
      long delay = Long.valueOf(task.getParams()[0]);
View Full Code Here

Examples of mapss.dif.psdf.PSDFAPGANStrategy.schedule()

        if (_debugFlag) {
            graph.printEdgeRateExpressions();
        }

        PSDFAPGANStrategy strategy = new PSDFAPGANStrategy(graph);
        ptolemy.graph.sched.Schedule graphSchedule = strategy.schedule();
        _debug("P-APGAN schedule = \n" + graphSchedule.toString());

        SymbolicScheduleElement resultSchedule = _expandAPGAN(graph, strategy
                .getClusterManager().getRootNode(), strategy);
        resultSchedule.setIterationCount(vectorizationFactorExpression);
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.