com.aelitis.azureus.core.download
Class EnhancedDownloadManager

java.lang.Object
  extended by com.aelitis.azureus.core.download.EnhancedDownloadManager

public class EnhancedDownloadManager
extends Object


Nested Class Summary
protected  class EnhancedDownloadManager.bufferETAProvider
           
protected static class EnhancedDownloadManager.progressiveStats
           
protected  class EnhancedDownloadManager.progressiveStatsCommon
           
 
Field Summary
static int DEFAULT_MINIMUM_INITIAL_BUFFER_SECS_FOR_ETA
           
static int LOG_PROG_STATS_PERIOD
           
static int LOG_PROG_STATS_TICKS
           
static int MINIMUM_INITIAL_BUFFER_SECS
           
static int REACTIVATE_PROVIDER_PERIOD
           
static int REACTIVATE_PROVIDER_PERIOD_TICKS
           
 
Constructor Summary
protected EnhancedDownloadManager(DownloadManagerEnhancer _enhancer, DownloadManager _download_manager)
           
 
Method Summary
protected  EnhancedDownloadManager.progressiveStats createProgressiveStats(DownloadManager dm, EnhancedDownloadManagerFile file)
           
protected  void destroy()
           
 long getContiguousAvailableBytes(int file_index, long file_start_offset, long stop_counting_after)
           
 DownloadManager getDownloadManager()
           
 EnhancedDownloadManagerFile[] getFiles()
           
 byte[] getHash()
           
 String getName()
           
 int getPrimaryFileIndex()
           
 boolean getProgressiveMode()
           
 long getProgressivePlayETA()
           
protected  EnhancedDownloadManager.progressiveStats getProgressiveStats()
           
protected  long getTargetSpeed()
           
 boolean isPlatform()
           
protected  void log(DownloadManager dm, String str, boolean to_file)
           
protected  void log(String str)
           
protected  void log(String str, boolean to_file)
           
 void prepareForProgressiveMode(boolean active)
           
 void setExplicitProgressive(int min_initial_buffer_secs, long min_bps, int file_index)
           
 boolean setProgressiveMode(boolean active)
           
protected  boolean setProgressiveMode(boolean active, boolean switching_progressive_downloads)
           
protected  void setRTA(boolean active)
           
 boolean supportsProgressiveMode()
           
protected  boolean updateProgressiveStats(int tick_count)
           
protected  boolean updateStats(int tick_count)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MINIMUM_INITIAL_BUFFER_SECS_FOR_ETA

public static int DEFAULT_MINIMUM_INITIAL_BUFFER_SECS_FOR_ETA

MINIMUM_INITIAL_BUFFER_SECS

public static int MINIMUM_INITIAL_BUFFER_SECS

REACTIVATE_PROVIDER_PERIOD

public static final int REACTIVATE_PROVIDER_PERIOD
See Also:
Constant Field Values

REACTIVATE_PROVIDER_PERIOD_TICKS

public static final int REACTIVATE_PROVIDER_PERIOD_TICKS
See Also:
Constant Field Values

LOG_PROG_STATS_PERIOD

public static final int LOG_PROG_STATS_PERIOD
See Also:
Constant Field Values

LOG_PROG_STATS_TICKS

public static final int LOG_PROG_STATS_TICKS
See Also:
Constant Field Values
Constructor Detail

EnhancedDownloadManager

protected EnhancedDownloadManager(DownloadManagerEnhancer _enhancer,
                                  DownloadManager _download_manager)
Method Detail

getPrimaryFileIndex

public int getPrimaryFileIndex()

setExplicitProgressive

public void setExplicitProgressive(int min_initial_buffer_secs,
                                   long min_bps,
                                   int file_index)

getName

public String getName()

getHash

public byte[] getHash()

isPlatform

public boolean isPlatform()

getFiles

public EnhancedDownloadManagerFile[] getFiles()

getTargetSpeed

protected long getTargetSpeed()

updateStats

protected boolean updateStats(int tick_count)

supportsProgressiveMode

public boolean supportsProgressiveMode()

prepareForProgressiveMode

public void prepareForProgressiveMode(boolean active)

setProgressiveMode

public boolean setProgressiveMode(boolean active)

setProgressiveMode

protected boolean setProgressiveMode(boolean active,
                                     boolean switching_progressive_downloads)

getProgressiveMode

public boolean getProgressiveMode()

getProgressivePlayETA

public long getProgressivePlayETA()

getProgressiveStats

protected EnhancedDownloadManager.progressiveStats getProgressiveStats()

createProgressiveStats

protected EnhancedDownloadManager.progressiveStats createProgressiveStats(DownloadManager dm,
                                                                          EnhancedDownloadManagerFile file)

updateProgressiveStats

protected boolean updateProgressiveStats(int tick_count)

setRTA

protected void setRTA(boolean active)

getContiguousAvailableBytes

public long getContiguousAvailableBytes(int file_index,
                                        long file_start_offset,
                                        long stop_counting_after)

getDownloadManager

public DownloadManager getDownloadManager()

destroy

protected void destroy()

log

protected void log(String str)

log

protected void log(String str,
                   boolean to_file)

log

protected void log(DownloadManager dm,
                   String str,
                   boolean to_file)