Package com.biglybt.core.dht.control
Interface DHTControl
- All Known Implementing Classes:
DHTControlImpl
public interface DHTControl
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionvoid
int
compareDistances
(byte[] n1, byte[] n2) int
computeAndCompareDistances
(byte[] n1, byte[] n2, byte[] pivot) byte[]
computeDistance
(byte[] n1, byte[] n2) void
destroy()
void
exportState
(DataOutputStream os, int max) void
get
(byte[] key, String description, short flags, int max_values, long timeout, boolean exhaustive, boolean high_priority, DHTOperationListener listener) getClosestContactsList
(byte[] id, int num_to_return, boolean live_only) getClosestKContactsList
(byte[] id, boolean live_only) getLocalValue
(byte[] key) byte[]
getObfuscatedKey
(byte[] plain_key) getStats()
getStoredValues
(byte[] key) void
boolean
isDiversified
(byte[] key) boolean
isSeeded()
boolean
lookup
(byte[] id, String description, long timeout, DHTOperationListener listener) boolean
lookupEncoded
(byte[] id, String description, long timeout, boolean high_priority, DHTOperationListener listener) void
pingAll()
void
print
(boolean full) void
put
(byte[] key, String description, byte[] value, short flags, byte life_hours, byte replication_control, boolean high_priority, DHTOperationListener listener) void
putDirectEncodedKeys
(byte[][] keys, String description, DHTTransportValue[][] value_sets, DHTTransportContact contact, DHTOperationListener listener) void
putDirectEncodedKeys
(byte[][] keys, String description, DHTTransportValue[][] value_sets, List<DHTTransportContact> contacts) void
putEncodedKey
(byte[] key, String description, DHTTransportValue value, long timeout, boolean original_mappings) byte[]
remove
(byte[] key, String description, short flags, DHTOperationListener listener) byte[]
remove
(byte[] key, String description, DHTOperationListener listener) byte[]
remove
(DHTTransportContact[] contacts, byte[] key, String description, DHTOperationListener listener) void
void
seed
(boolean full_wait) void
Manually mark things as seededvoid
setSleeping
(boolean asleep) void
setSuspended
(boolean susp) boolean
verifyContact
(DHTTransportContact c, boolean direct)
-
Field Details
-
K_DEFAULT
static final int K_DEFAULT- See Also:
-
B_DEFAULT
static final int B_DEFAULT- See Also:
-
MAX_REP_PER_NODE_DEFAULT
static final int MAX_REP_PER_NODE_DEFAULT- See Also:
-
SEARCH_CONCURRENCY_DEFAULT
static final int SEARCH_CONCURRENCY_DEFAULT- See Also:
-
LOOKUP_CONCURRENCY_DEFAULT
static final int LOOKUP_CONCURRENCY_DEFAULT- See Also:
-
CACHE_AT_CLOSEST_N_DEFAULT
static final int CACHE_AT_CLOSEST_N_DEFAULT- See Also:
-
ORIGINAL_REPUBLISH_INTERVAL_DEFAULT
static final int ORIGINAL_REPUBLISH_INTERVAL_DEFAULT- See Also:
-
CACHE_REPUBLISH_INTERVAL_DEFAULT
static final int CACHE_REPUBLISH_INTERVAL_DEFAULT- See Also:
-
ENCODE_KEYS_DEFAULT
static final int ENCODE_KEYS_DEFAULT- See Also:
-
ENABLE_RANDOM_DEFAULT
static final int ENABLE_RANDOM_DEFAULT- See Also:
-
-
Method Details
-
seed
void seed(boolean full_wait) -
isSeeded
boolean isSeeded() -
setSeeded
void setSeeded()Manually mark things as seeded -
setSuspended
void setSuspended(boolean susp) -
put
void put(byte[] key, String description, byte[] value, short flags, byte life_hours, byte replication_control, boolean high_priority, DHTOperationListener listener) -
isDiversified
boolean isDiversified(byte[] key) -
getLocalValue
-
getStoredValues
-
get
void get(byte[] key, String description, short flags, int max_values, long timeout, boolean exhaustive, boolean high_priority, DHTOperationListener listener) -
remove
-
remove
-
remove
byte[] remove(DHTTransportContact[] contacts, byte[] key, String description, DHTOperationListener listener) -
getStats
DHTControlStats getStats() -
setSleeping
void setSleeping(boolean asleep) -
getTransport
DHTTransport getTransport() -
getRouter
DHTRouter getRouter() -
getDataBase
DHTDB getDataBase() -
getActivities
DHTControlActivity[] getActivities() -
exportState
- Throws:
IOException
-
importState
- Throws:
IOException
-
getClosestKContactsList
-
getClosestContactsList
-
putEncodedKey
void putEncodedKey(byte[] key, String description, DHTTransportValue value, long timeout, boolean original_mappings) -
putDirectEncodedKeys
void putDirectEncodedKeys(byte[][] keys, String description, DHTTransportValue[][] value_sets, List<DHTTransportContact> contacts) -
putDirectEncodedKeys
void putDirectEncodedKeys(byte[][] keys, String description, DHTTransportValue[][] value_sets, DHTTransportContact contact, DHTOperationListener listener) -
computeAndCompareDistances
int computeAndCompareDistances(byte[] n1, byte[] n2, byte[] pivot) -
computeDistance
byte[] computeDistance(byte[] n1, byte[] n2) -
compareDistances
int compareDistances(byte[] n1, byte[] n2) -
verifyContact
-
lookup
-
lookupEncoded
boolean lookupEncoded(byte[] id, String description, long timeout, boolean high_priority, DHTOperationListener listener) -
getObfuscatedKey
byte[] getObfuscatedKey(byte[] plain_key) -
getContacts
List<DHTControlContact> getContacts() -
pingAll
void pingAll() -
addListener
-
removeListener
-
destroy
void destroy() -
print
void print(boolean full)
-