Iterator<RetireJobInfo> iterator =
tracker.retireJobs.getAll().descendingIterator();
for (int i = 0; i < 100 && iterator.hasNext(); i++) {
RetireJobInfo info = iterator.next();
JobStatus status = info.status;
StringBuilder sb = new StringBuilder();
sb.append("<retired_job rowid=\"" + rowId + "\" jobid=\"" + status.getJobId() + "\">");
sb.append("<jobid>" + status.getJobId() + "</jobid>");
sb.append("<history_url>jobdetailshistory.jsp?jobid=" + status.getJobId()
+ "&logFile="
+ URLEncoder.encode(info.getHistoryFile().toString(), "UTF-8")
+ "</history_url>");
sb.append("<priority>" + status.getJobPriority().toString()
+ "</priority>");
sb.append("<user>" + info.profile.getUser() + "</user>");
sb.append("<name>" + info.profile.getJobName() + "</name>");