Java Timer Usage runRotateKeys()

Here you can find the source of runRotateKeys()

Description

run Rotate Keys

License

Open Source License

Declaration

public static void runRotateKeys() 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.Timer;
import java.util.TimerTask;

public class Main {
    public static void runRotateKeys() {
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            @Override//w w  w .j a  va2 s.co m
            public void run() {
                System.out.println("Rotating keys...");
            }
        }, 2 * 60 * 1000, 2 * 60 * 1000); // (delay,period) 7*24*60*60*1000 For 7 days
    }
}

Related

  1. getQuickSearchTimer()
  2. getSlowTimer()
  3. getTimer(String id)
  4. mayNewTasksBeScheduled(Timer timer)
  5. printLoadToConsole(int milliOffset)
  6. schedule(final TimerTask task, final int delay, final int period)
  7. schedule(TimerTask task, long delay, long period, String name)
  8. startTimerWithDelayInMillis(TimerTask task, long millisToDelay, long intervalInMillis)
  9. stop(final TimerTask task)