Package java.util

Examples of java.util.Timer


     */
    @Override
    public void startTimer()
    {
      //防止系统退出时Timer没有退出,把timer设置为Deamon线程
      this.timer = new Timer("MapleFetionTimer", true);
      logger.debug("ThreadTimer started...");
    }
View Full Code Here


     */
    @Override
    public synchronized void startTimer()
    {
      if(this.timer==null) {
        this.timer = new Timer("MapleFetionSharedTimer");
      }
    }
View Full Code Here

   * @param callback callback object.
   */
  public Scheduler(SchedulerCallbackIF callback) {
    this.callback = callback;

    timer = new Timer(true);
  }
View Full Code Here

      }
    }
  }

  private void startMaintenanceTimer(int period) {
    maintenanceTimer = new Timer(true);
    maintenanceTimer.schedule(new TimerTask() {
      public void run() {
        if (maintenanceScheduled) {
          gc();
          // need to lock for consistent backup
View Full Code Here

  private static String source;
  private static Runnable runnable;

  public static void start() {
    stop();
    timer = new Timer();
    timer.schedule(new TimerTask() {
      public void run() {
        try {
          String newSource = Registry
              .getParameter(Names.JEASE_TIMER_TASK);
View Full Code Here

  private Timer refreshTimer = null;

  public FeedRefreshDaemon() {
    logger.info("FeedRefresh Daemon instancied");
    this.refreshTimer = new Timer(true);
  }
View Full Code Here

      this.ramd = rdmd.getRaXmlMetaData();     
   }

   public Timer createTimer() throws UnavailableException
   {
      return new Timer(true);
   }
View Full Code Here

   */
  public ChannelRegistry(ChannelBuilderIF builder) {
    this.builder = builder;
    this.channels = builder.createChannelGroup("Default");
    // start a new timer 'daemon' which controls updating tasks
    updateDaemon = new Timer(true);
    updateTasks = new HashMap<URL, UpdateChannelTask>();
    channelInfos = new HashMap<URL, UpdateChannelInfo>();
    acceptNrOfErrors = DEFAULT_ACCEPT_NR_ERRORS;
  }
View Full Code Here

        this.frame = frame;
    }

    public void startAutoSaveTimer() {
        task = new AutoSaveTask();
        t = new Timer();
        long interval = (long)(60000*Globals.prefs.getInt("autoSaveInterval"));
        t.scheduleAtFixedRate(task, interval, interval);
    }
View Full Code Here

  /**
   * 启动定时器
   */
  protected void startTimer() {
    if(timer == null) {
      timer = new Timer(true);
    }
  }
View Full Code Here

TOP

Related Classes of java.util.Timer

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.