コード例 #1
0
 synchronized void gotFinalURI(String identifier, FreenetURI finalURI) {
   UploadRequestStatus status = (UploadRequestStatus) requestsByIdentifier.get(identifier);
   if (status == null) return; // Can happen during cancel etc.
   if (status.getFinalURI() == null)
     // No final URI set yet, put into the index.
     uploadsByFinalURI.put(finalURI, status);
   status.setFinalURI(finalURI);
 }
コード例 #2
0
 synchronized void finishedUpload(
     String identifier,
     boolean success,
     FreenetURI finalURI,
     InsertExceptionMode failureCode,
     String failureReasonShort,
     String failureReasonLong) {
   UploadRequestStatus status = (UploadRequestStatus) requestsByIdentifier.get(identifier);
   if (status == null) return; // Can happen during cancel etc.
   if (status.getFinalURI() == null && finalURI != null)
     // No final URI set yet, put into the index.
     uploadsByFinalURI.put(finalURI, status);
   status.setFinished(success, finalURI, failureCode, failureReasonShort, failureReasonLong);
 }