Class TestPingSourceImpl
- java.lang.Object
-
- com.biglybt.core.speedmanager.impl.TestPingSourceImpl
-
- All Implemented Interfaces:
DHTSpeedTester
- Direct Known Subclasses:
TestPingSourceRandom
public abstract class TestPingSourceImpl extends java.lang.Object implements DHTSpeedTester
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
TestPingSourceImpl.testSource
-
Field Summary
Fields Modifier and Type Field Description private SpeedManagerAlgorithmProviderAdapter
adapter
private int
contact_num
private java.util.List
listeners
private int
period
(package private) CopyOnWriteList
sources
-
Constructor Summary
Constructors Modifier Constructor Description protected
TestPingSourceImpl(SpeedManagerAlgorithmProviderAdapter _adapter)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addContact(TestPingSourceImpl.testSource contact)
void
addListener(DHTSpeedTesterListener listener)
void
destroy()
protected SpeedManagerAlgorithmProviderAdapter
getAdapter()
int
getContactNumber()
protected void
removeContact(TestPingSourceImpl.testSource contact)
void
removeListener(DHTSpeedTesterListener listener)
void
setContactNumber(int number)
protected void
update(TestPingSourceImpl.testSource[] contacts)
protected abstract void
updateSources(TestPingSourceImpl.testSource[] sources)
-
-
-
Field Detail
-
adapter
private final SpeedManagerAlgorithmProviderAdapter adapter
-
contact_num
private volatile int contact_num
-
listeners
private final java.util.List listeners
-
sources
final CopyOnWriteList sources
-
period
private int period
-
-
Constructor Detail
-
TestPingSourceImpl
protected TestPingSourceImpl(SpeedManagerAlgorithmProviderAdapter _adapter)
-
-
Method Detail
-
getAdapter
protected SpeedManagerAlgorithmProviderAdapter getAdapter()
-
update
protected void update(TestPingSourceImpl.testSource[] contacts)
-
updateSources
protected abstract void updateSources(TestPingSourceImpl.testSource[] sources)
-
getContactNumber
public int getContactNumber()
- Specified by:
getContactNumber
in interfaceDHTSpeedTester
-
setContactNumber
public void setContactNumber(int number)
- Specified by:
setContactNumber
in interfaceDHTSpeedTester
-
addContact
protected void addContact(TestPingSourceImpl.testSource contact)
-
removeContact
protected void removeContact(TestPingSourceImpl.testSource contact)
-
destroy
public void destroy()
- Specified by:
destroy
in interfaceDHTSpeedTester
-
addListener
public void addListener(DHTSpeedTesterListener listener)
- Specified by:
addListener
in interfaceDHTSpeedTester
-
removeListener
public void removeListener(DHTSpeedTesterListener listener)
- Specified by:
removeListener
in interfaceDHTSpeedTester
-
-