Package com.biglybt.plugin.net.netstatus
Class NetStatusProtocolTester
- java.lang.Object
-
- com.biglybt.plugin.net.netstatus.NetStatusProtocolTester
-
- All Implemented Interfaces:
DistributedDatabaseTransferHandler
public class NetStatusProtocolTester extends java.lang.Object implements DistributedDatabaseTransferHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
NetStatusProtocolTester.testXferType
-
Field Summary
Fields Modifier and Type Field Description private java.util.List
active_tests
private static int
BT_MAX_SLAVES
private static int
CURRENT_VERSION
private DistributedDatabase
ddb
private DHTPlugin
dht_plugin
private static int
MAX_ACTIVE_TESTS
private static int
MAX_TEST_TIME
private NetStatusPlugin
plugin
private PluginInterface
plugin_interface
private java.util.Map
request_history
private static int
REQUEST_HISTORY_MAX
private static int
TEST_TYPE_BT
private TimerEventPeriodic
timer_event
private NetStatusProtocolTester.testXferType
transfer_type
private static int
VERSION_INITIAL
-
Constructor Summary
Constructors Modifier Constructor Description protected
NetStatusProtocolTester(NetStatusPlugin _plugin, PluginInterface _plugin_interface)
-
Method Summary
-
-
-
Field Detail
-
REQUEST_HISTORY_MAX
private static final int REQUEST_HISTORY_MAX
- See Also:
- Constant Field Values
-
MAX_ACTIVE_TESTS
private static final int MAX_ACTIVE_TESTS
- See Also:
- Constant Field Values
-
MAX_TEST_TIME
private static final int MAX_TEST_TIME
- See Also:
- Constant Field Values
-
TEST_TYPE_BT
private static final int TEST_TYPE_BT
- See Also:
- Constant Field Values
-
VERSION_INITIAL
private static final int VERSION_INITIAL
- See Also:
- Constant Field Values
-
CURRENT_VERSION
private static final int CURRENT_VERSION
- See Also:
- Constant Field Values
-
BT_MAX_SLAVES
private static final int BT_MAX_SLAVES
- See Also:
- Constant Field Values
-
plugin
private NetStatusPlugin plugin
-
plugin_interface
private PluginInterface plugin_interface
-
ddb
private DistributedDatabase ddb
-
dht_plugin
private DHTPlugin dht_plugin
-
transfer_type
private NetStatusProtocolTester.testXferType transfer_type
-
request_history
private java.util.Map request_history
-
active_tests
private java.util.List active_tests
-
timer_event
private TimerEventPeriodic timer_event
-
-
Constructor Detail
-
NetStatusProtocolTester
protected NetStatusProtocolTester(NetStatusPlugin _plugin, PluginInterface _plugin_interface)
-
-
Method Detail
-
runTest
public NetStatusProtocolTesterBT runTest(NetStatusProtocolTesterListener listener)
-
runTest
public NetStatusProtocolTesterBT runTest(java.lang.String test_address, NetStatusProtocolTesterListener listener)
-
createTester
public NetStatusProtocolTesterBT createTester(NetStatusProtocolTesterListener listener)
-
tryTest
public boolean tryTest(NetStatusProtocolTesterBT bt_tester, DistributedDatabaseContact contact)
-
adjustLoopback
protected java.net.InetSocketAddress adjustLoopback(java.net.InetSocketAddress address)
-
sendRequest
protected java.util.Map sendRequest(DistributedDatabaseContact contact, java.util.Map request)
-
receiveRequest
protected java.util.Map receiveRequest(java.net.InetSocketAddress originator, java.util.Map request)
-
addToActive
protected void addToActive(NetStatusProtocolTesterBT tester)
-
removeFromActive
protected void removeFromActive(NetStatusProtocolTesterBT tester)
-
read
public DistributedDatabaseValue read(DistributedDatabaseContact contact, DistributedDatabaseTransferType type, DistributedDatabaseKey ddb_key) throws DistributedDatabaseException
- Specified by:
read
in interfaceDistributedDatabaseTransferHandler
- Throws:
DistributedDatabaseException
-
write
public DistributedDatabaseValue write(DistributedDatabaseContact contact, DistributedDatabaseTransferType type, DistributedDatabaseKey key, DistributedDatabaseValue value) throws DistributedDatabaseException
- Specified by:
write
in interfaceDistributedDatabaseTransferHandler
- Throws:
DistributedDatabaseException
-
log
public void log(java.lang.String str)
-
log
public void log(java.lang.String str, java.lang.Throwable e)
-
-