use of com.dangdang.ddframe.job.lite.lifecycle.domain.ServerInfo in project elastic-job by dangdangdotcom.
the class ServerStatisticsAPIImpl method getJobs.
@Override
public Collection<ServerInfo> getJobs(final String serverIp) {
List<String> jobs = regCenter.getChildrenKeys("/");
Collection<ServerInfo> result = new ArrayList<>(jobs.size());
for (String each : jobs) {
JobNodePath jobNodePath = new JobNodePath(each);
if (regCenter.isExisted(jobNodePath.getServerNodePath(serverIp))) {
result.add(getJob(serverIp, each));
}
}
return result;
}
Aggregations