Package java.util

Examples of java.util.TimerTask.cancel()


        for (Iterator iterator = ids.iterator(); iterator.hasNext();) {
            Long idLong = (Long) iterator.next();
            WorkInfo workInfo = getWorkInfo(idLong);
            if (workInfo != null) {
                TimerTask timerTask = workInfo.getExecutorFeedingTimerTask();
                timerTask.cancel();
            }
        }
    }

    void addWorkInfo(WorkInfo worker) {
View Full Code Here


      if(!running)
        return;
     
      TimerTask t = jobs.remove(job);
      if(t != null) {
        t.cancel();
      }
    }
  }
 
  /**
 
View Full Code Here

                }
            }
            getSession().getFactoryManager().getScheduledExecutorService().schedule(task, timeout, TimeUnit.MILLISECONDS);
            commandExitFuture.addListener(new SshFutureListener<CloseFuture>() {
                public void operationComplete(CloseFuture future) {
                    task.cancel();
                }
            });
        }
        return commandExitFuture;
    }
View Full Code Here

                    }
                    log.debug("Wait {} ms for shell to exit cleanly", timeout);
                    getSession().getFactoryManager().getScheduledExecutorService().schedule(task, timeout, TimeUnit.MILLISECONDS);
                    commandExitFuture.addListener(new SshFutureListener<CloseFuture>() {
                        public void operationComplete(CloseFuture future) {
                            task.cancel();
                        }
                    });
                }
                return commandExitFuture;
            }
View Full Code Here

            // by the "active" boolean flag
            TimerTask task = statusTaskMap.remove(identity);
            if (task != null) {
                // if there was a timer task pending, then we've just negated
                // it with the new status, so cancel the task
                task.cancel();
            } else {
                // there was no pending task, so set one up
                task = new StatusChangeTask(identity, active);
                statusTaskMap.put(identity, task);
                statusUpdateTimer.schedule(task, voteDelay);
View Full Code Here

            }
        }
        server.closeConnection();

        // Stop the timer, server should be up now
        timeoutTask.cancel();

        log.info("Geronimo server started in " + watch);

        if (!background) {
            log.info("Waiting for Geronimo server to shutdown...");
View Full Code Here

        for (Iterator iterator = ids.iterator(); iterator.hasNext();) {
            Long idLong = (Long) iterator.next();
            WorkInfo workInfo = getWorkInfo(idLong);
            if (workInfo != null) {
                TimerTask timerTask = workInfo.getExecutorFeedingTimerTask();
                timerTask.cancel();
            }
        }
    }

    void addWorkInfo(WorkInfo worker) {
View Full Code Here

            }
        }
        server.closeConnection();

        // Stop the timer, server should be up now
        timeoutTask.cancel();

        log.info("Geronimo server started in " + watch);

        if (!background) {
            log.info("Waiting for Geronimo server to shutdown...");
View Full Code Here

            }
        }
        server.closeConnection();

        // Stop the timer, server should be up now
        timeoutTask.cancel();

        log.info("Geronimo server started");
    }

    protected String getFullClassName() {
View Full Code Here

      field.setAccessible(true);
      LeasePinger pinger = (LeasePinger) field.get(client.getInvoker());
      field = LeasePinger.class.getDeclaredField("timerTask");
      field.setAccessible(true);
      TimerTask timerTask = (TimerTask) field.get(pinger);
      timerTask.cancel();
     
      synchronized(lock)
      {
         lock.wait();
      }
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.