C# Class Illumina.TerminalVelocity.Downloader

Mostra file Open project: basespace/TerminalVelocity Class Usage Examples

Private Properties

Property Type Description
ExecuteAndSquash void
StartDownloading void

Public Methods

Method Description
ComputeProgressIndicator ( long bytesWritten, long fileSize ) : int
Dispose ( ) : void
Downloader ( BufferManager bufferManager, ILargeFileDownloadParameters parameters, ConcurrentQueue writeQueue, ConcurrentStack readStack, bool>.Func downloadThrottle, int expectedChunkTimeInSeconds, FailureToken failureToken, Action logger = null, CancellationToken cancellation = null, ISimpleHttpGetByRangeClient>.Func clientFactory = null ) : System
ExpectedDownloadTimeInSeconds ( int chunkSizeInBytes ) : int
GetChunkCount ( long fileSize, long chunkSize ) : int
GetChunkSizeForCurrentChunk ( long fileSize, int maxChunkSize, int zeroBasedChunkNumber ) : int
GetChunkStart ( int currentChunk, int maxChunkSize ) : long
NeedToCheckForUnwrittenChunks ( ConcurrentStack readStack, System.DateTime lastWriteTime, int minutesToWait ) : bool
Start ( ) : void
Wait ( System.TimeSpan time ) : void
Wait ( int time ) : void

Private Methods

Method Description
ExecuteAndSquash ( System.Action a ) : void
StartDownloading ( CancellationToken ct, FailureToken ft, ILargeFileDownloadParameters parameters, IAsyncProgress progress = null, Action logger = null, BufferManager bufferManager = null ) : void

Method Details

ComputeProgressIndicator() public static method

public static ComputeProgressIndicator ( long bytesWritten, long fileSize ) : int
bytesWritten long
fileSize long
return int

Dispose() public method

public Dispose ( ) : void
return void

Downloader() public method

public Downloader ( BufferManager bufferManager, ILargeFileDownloadParameters parameters, ConcurrentQueue writeQueue, ConcurrentStack readStack, bool>.Func downloadThrottle, int expectedChunkTimeInSeconds, FailureToken failureToken, Action logger = null, CancellationToken cancellation = null, ISimpleHttpGetByRangeClient>.Func clientFactory = null ) : System
bufferManager BufferManager
parameters ILargeFileDownloadParameters
writeQueue ConcurrentQueue
readStack ConcurrentStack
downloadThrottle bool>.Func
expectedChunkTimeInSeconds int
failureToken FailureToken
logger Action
cancellation System.Threading.CancellationToken
clientFactory ISimpleHttpGetByRangeClient>.Func
return System

ExpectedDownloadTimeInSeconds() public static method

public static ExpectedDownloadTimeInSeconds ( int chunkSizeInBytes ) : int
chunkSizeInBytes int
return int

GetChunkCount() public static method

public static GetChunkCount ( long fileSize, long chunkSize ) : int
fileSize long
chunkSize long
return int

GetChunkSizeForCurrentChunk() public static method

public static GetChunkSizeForCurrentChunk ( long fileSize, int maxChunkSize, int zeroBasedChunkNumber ) : int
fileSize long
maxChunkSize int
zeroBasedChunkNumber int
return int

GetChunkStart() public static method

public static GetChunkStart ( int currentChunk, int maxChunkSize ) : long
currentChunk int
maxChunkSize int
return long

NeedToCheckForUnwrittenChunks() public static method

public static NeedToCheckForUnwrittenChunks ( ConcurrentStack readStack, System.DateTime lastWriteTime, int minutesToWait ) : bool
readStack ConcurrentStack
lastWriteTime System.DateTime
minutesToWait int
return bool

Start() public method

public Start ( ) : void
return void

Wait() public method

public Wait ( System.TimeSpan time ) : void
time System.TimeSpan
return void

Wait() public method

public Wait ( int time ) : void
time int
return void