Lines 1-4
Link Here
|
1 |
/* |
1 |
/* |
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
3 |
* |
3 |
* |
4 |
* Copyright 2010 Oracle and/or its affiliates. All rights reserved. |
4 |
* Copyright 2010 Oracle and/or its affiliates. All rights reserved. |
Lines 224-229
Link Here
|
224 |
|
224 |
|
225 |
private void taskFinished(Future<UploadStatus> finishedTask) { |
225 |
private void taskFinished(Future<UploadStatus> finishedTask) { |
226 |
LOGGER.log(Level.FINEST, "WritingQueue: Task {0} at {1} finished", new Object[]{finishedTask, execEnv}); |
226 |
LOGGER.log(Level.FINEST, "WritingQueue: Task {0} at {1} finished", new Object[]{finishedTask, execEnv}); |
|
|
227 |
UploadStatus uploadStatus = null; |
227 |
synchronized (lock) { |
228 |
synchronized (lock) { |
228 |
if (currentTask != null && currentTask != finishedTask) { |
229 |
if (currentTask != null && currentTask != finishedTask) { |
229 |
// currentTask can contain either null or the last task |
230 |
// currentTask can contain either null or the last task |
Lines 239-249
Link Here
|
239 |
return; |
240 |
return; |
240 |
} |
241 |
} |
241 |
try { |
242 |
try { |
242 |
UploadStatus uploadStatus = finishedTask.get(); |
243 |
uploadStatus = finishedTask.get(); |
243 |
if (uploadStatus.isOK()) { |
244 |
if (uploadStatus.isOK()) { |
244 |
LOGGER.log(Level.FINEST, "WritingQueue: uploading {0} succeeded", fo); |
245 |
LOGGER.log(Level.FINEST, "WritingQueue: uploading {0} succeeded", fo); |
245 |
failed.remove(fo.getPath()); // paranoia |
246 |
failed.remove(fo.getPath()); // paranoia |
246 |
fo.getParent().updateStat(fo, uploadStatus.getStatInfo()); |
|
|
247 |
} else { |
247 |
} else { |
248 |
LOGGER.log(Level.FINEST, "WritingQueue: uploading {0} failed", fo); |
248 |
LOGGER.log(Level.FINEST, "WritingQueue: uploading {0} failed", fo); |
249 |
failed.add(fo.getPath()); |
249 |
failed.add(fo.getPath()); |
Lines 259-264
Link Here
|
259 |
} |
259 |
} |
260 |
progress.entryDone(entries.size()); |
260 |
progress.entryDone(entries.size()); |
261 |
} |
261 |
} |
|
|
262 |
if (uploadStatus != null && uploadStatus.isOK()) { |
263 |
fo.getParent().updateStat(fo, uploadStatus.getStatInfo()); |
264 |
} |
262 |
} |
265 |
} |
263 |
} |
266 |
} |
264 |
|
267 |
|