com.aelitis.azureus.core.peermanager.control.impl
Class PeerControlSchedulerImpl

java.lang.Object
  extended by com.aelitis.azureus.core.peermanager.control.impl.PeerControlSchedulerImpl
All Implemented Interfaces:
PeerControlScheduler, AzureusCoreStatsProvider, ParameterListener
Direct Known Subclasses:
PeerControlSchedulerBasic, PeerControlSchedulerPrioritised

public abstract class PeerControlSchedulerImpl
extends Object
implements PeerControlScheduler, AzureusCoreStatsProvider, ParameterListener


Field Summary
protected  long schedule_count
           
protected  long total_wait_time
           
protected  boolean useWeights
           
protected  long wait_count
           
protected  long yield_count
           
 
Fields inherited from interface com.aelitis.azureus.core.peermanager.control.PeerControlScheduler
SCHEDULE_PERIOD_MAX_CATCHUP, SCHEDULE_PERIOD_MILLIS
 
Constructor Summary
protected PeerControlSchedulerImpl()
           
 
Method Summary
static PeerControlScheduler getSingleton(int id)
           
static void overrideAllWeightedPriorities(boolean b)
           
 void overrideWeightedPriorities(boolean override)
           
 void parameterChanged(String parameterName)
          Called, when a parameter has changed.
protected abstract  void schedule()
           
protected  void start()
           
static void updateAllScheduleOrdering()
           
 void updateStats(Set types, Map values)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.aelitis.azureus.core.peermanager.control.PeerControlScheduler
getSpeedTokenDispenser, register, unregister, updateScheduleOrdering
 

Field Detail

useWeights

protected boolean useWeights

schedule_count

protected long schedule_count

wait_count

protected long wait_count

yield_count

protected long yield_count

total_wait_time

protected long total_wait_time
Constructor Detail

PeerControlSchedulerImpl

protected PeerControlSchedulerImpl()
Method Detail

parameterChanged

public void parameterChanged(String parameterName)
Description copied from interface: ParameterListener
Called, when a parameter has changed. The listener could only react if the parameter name is relevant. Or the listener can just read all parameters again.

Specified by:
parameterChanged in interface ParameterListener
Parameters:
parameterName - the name of the parameter that has changed

getSingleton

public static PeerControlScheduler getSingleton(int id)

overrideAllWeightedPriorities

public static void overrideAllWeightedPriorities(boolean b)

updateAllScheduleOrdering

public static void updateAllScheduleOrdering()

start

protected void start()

updateStats

public void updateStats(Set types,
                        Map values)
Specified by:
updateStats in interface AzureusCoreStatsProvider

schedule

protected abstract void schedule()

overrideWeightedPriorities

public void overrideWeightedPriorities(boolean override)
Specified by:
overrideWeightedPriorities in interface PeerControlScheduler