コード例 #1
0
 /// <param name="progressListener"> <seealso cref="ProgressListener"/> to report upload progress to. </param>
 /// <param name="position"> initial position to start the upload from. This is only useful if the upload was started and made it part-way
 /// there before the command failed and the command has to be reissued at which point it can be resumed. This position is the position
 /// where the upload will continue from. This is separate from temporary failure where the upload will be retried after some back-off.
 /// That logic will instead make use of <seealso cref="rewindTo(long)"/>. </param>
 internal Progress(ProgressListener progressListener, long position)
 {
     UploadProgress = progressListener;
     if (position > 0)
     {
         UploadProgress.add(position);
     }
 }
コード例 #2
0
 internal virtual void Add(int increment)
 {
     ProgressConflict += increment;
     if (ProgressConflict > HighestReportedProgress)
     {
         UploadProgress.add(ProgressConflict - HighestReportedProgress);
         HighestReportedProgress = ProgressConflict;
     }
 }
コード例 #3
0
 public virtual bool Increment(int count)
 {
     _txSize += count;
     _total  += count;
     _progressListener.add(count);
     if (_txSize >= _intermediarySize)
     {
         _txSize = 0;
         IntermediaryCommit();
         return(true);
     }
     return(false);
 }