|
|
package com.monitor.middleware.zookeeper;
|
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
/**
|
|
|
* Created by yoho on 2016/6/21.
|
|
|
*/
|
|
|
@Component
|
|
|
public class ZookeeperMonitorTask {
|
|
|
|
|
|
Logger log = LoggerFactory.getLogger(ZookeeperMonitorTask.class);
|
|
|
|
|
|
|
|
|
@Scheduled(fixedRate=10000)
|
|
|
public void run() {
|
|
|
log.info("task start...");
|
|
|
System.out.println("************************************************************");
|
|
|
log.info("task end...");
|
|
|
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|