|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.aelitis.azureus.plugins.startstoprules.defaultplugin.StartStopRulesDefaultPlugin
public class StartStopRulesDefaultPlugin
Handles Starting and Stopping of torrents. TODO: RANK_TIMED is quite a hack and is spread all over. It needs to be redone, probably with a timer on each seeding torrent which triggers when time is up and it needs to stop. BUG: When "AutoStart 0 Peers" is on, and minSpeedForActivelySeeding is enabled, the 0 peer torrents will continuously switch from seeding to queued, probably due to the connection attempt registering speed. This might be fixed by the "wait XX ms before switching active state" code. Other Notes: "CD" is often used to refer to "Seed" or "Seeding", because "C" sounds like "See"
Nested Class Summary | |
---|---|
static interface |
StartStopRulesDefaultPlugin.UIAdapter
|
Field Summary | |
---|---|
protected boolean |
bDebugLog
Whether Debug Info is written to the log and tooltip |
protected LoggerChannel |
log
|
static boolean |
pauseChangeFlagChecker
|
protected PluginConfig |
plugin_config
|
static int |
RANK_NONE
Do not rank completed torrents |
static int |
RANK_PEERCOUNT
Rank completed torrents using the peers count, weighted by the seeds to peers ratio |
static int |
RANK_SEEDCOUNT
Rank completed torrents using Seed Count method |
static int |
RANK_SPRATIO
Rank completed torrents using Seeds:Peer Ratio |
static int |
RANK_TIMED
Rank completed torrents using a timed rotation of minTimeAlive |
Constructor Summary | |
---|---|
StartStopRulesDefaultPlugin()
|
Method Summary | |
---|---|
void |
addListener(StartStopRulesFPListener listener)
|
int |
calcPeersNoUs(Download download,
DownloadScrapeResult sr)
Get # of peers not including us |
int |
calcSeedsNoUs(Download download,
DownloadScrapeResult sr)
Get # of seeds, not including us, AND including fake full copies |
int |
calcSeedsNoUs(Download download,
DownloadScrapeResult sr,
int numPeers)
Get # of seeds, not including us, AND including fake full copies |
void |
configurationSaved()
|
void |
generate(IndentWriter writer)
|
java.util.List |
getFPListeners()
|
protected int |
getMaxActive()
|
static DefaultRankCalculator |
getRankCalculator(Download dl)
|
void |
initialize(PluginInterface _plugin_interface)
This method is called when the Plugin is loaded by Azureus |
static void |
load(PluginInterface plugin_interface)
|
protected void |
process()
|
void |
removeListener(StartStopRulesFPListener listener)
|
void |
requestProcessCycle(DefaultRankCalculator rankToRecalc)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int RANK_NONE
public static final int RANK_SPRATIO
public static final int RANK_SEEDCOUNT
public static final int RANK_TIMED
public static final int RANK_PEERCOUNT
protected PluginConfig plugin_config
protected LoggerChannel log
protected boolean bDebugLog
public static boolean pauseChangeFlagChecker
Constructor Detail |
---|
public StartStopRulesDefaultPlugin()
Method Detail |
---|
public static void load(PluginInterface plugin_interface)
public void initialize(PluginInterface _plugin_interface)
Plugin
initialize
in interface Plugin
_plugin_interface
- the interface that the plugin must use to communicate with Azureuspublic static DefaultRankCalculator getRankCalculator(Download dl)
public void configurationSaved()
configurationSaved
in interface COConfigurationListener
protected int getMaxActive()
protected void process()
public int calcPeersNoUs(Download download, DownloadScrapeResult sr)
public int calcSeedsNoUs(Download download, DownloadScrapeResult sr)
download
- Download to get # of seeds for
public int calcSeedsNoUs(Download download, DownloadScrapeResult sr, int numPeers)
download
- Download to get # of seeds fornumPeers
- # peers we know of, required to calculate Fake Full Copies
public void requestProcessCycle(DefaultRankCalculator rankToRecalc)
public void generate(IndentWriter writer)
generate
in interface AEDiagnosticsEvidenceGenerator
public void addListener(StartStopRulesFPListener listener)
public void removeListener(StartStopRulesFPListener listener)
public java.util.List getFPListeners()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |