@@ -0,0 +1,1831 @@
+/**%0A * @Copyright to Hades.Yang 2015~2020.%0A * @ClassName: ScheduledTimer.%0A * @Project: Auto Config Server.%0A * @Package: autoconfigserver.%0A * @Description: The timer class which use ScheduledTimerTask as the task.%0A * @Author: Hades.Yang %0A * @Version: V1.0%0A * @Date: 2015-08-12%0A * @History: %0A *    1.2015-08-12 First version of ScheduledTimer was written.%0A */%0A%0A//package name. %0Apackage autoconfigserver;%0A %0A//import for java utilities.%0Aimport java.util.Timer;%0Aimport java.util.TimerTask;%0A %0A /**%0A * @ClassName: ScheduleTimer.%0A * @Description: this class which is used to submit specific info according to the timer value.%0A */%0Apublic class ScheduleTimer %0A%7B%0A%09/**%0A     * @FieldName: timer.%0A     * @Description: the private java.util.Timer object of this class.%0A     */%0A    private Timer timer;%0A    %0A%09/**%0A     * @Title: ScheduleTimer.%0A     * @Description: the construct function which is used to initialize the object.%0A%09   * @param serverinfo_0: the first redis server node ip & port information in the redis sentinel.%0A%09   * @param serverinfo_1: the second redis server node ip & port information in the redis sentinel.%0A     * @param serverinfo_2: the third redis server node ip & port information in the redis sentinel.%0A%09   * @param channle: the pub/sub channel on the redis server.%0A     * @param time: the interval value of the timer. %0A     * @return none.%0A     */%0A    public ScheduleTimer(String serverinfo_0, String serverinfo_1, String serverinfo_2, String channel, int time)%0A    %7B%0A    %09timer = new Timer();%0A    %09ScheduledTimerTask timerTask = new ScheduledTimerTask(serverinfo_0, serverinfo_1, serverinfo_2);%0A    %09timerTask.setChannel(channel);%0A    %09%0A    %09System.out.println(%22Timer Start!!!%22);%0A    %09%0A    %09//timer.schedule(new ScheduledTimerTask(), time*1000, time*3000);%0A    %09timer.schedule(timerTask, time*1000, time*1000);%0A    %7D%0A%7D%0A

Create ScheduleTimer.java