com.aelitis.azureus.core.dht.control
Interface DHTControl
- All Known Implementing Classes:
- DHTControlImpl
public interface DHTControl
- Author:
- parg
Method Summary |
void |
addListener(DHTControlListener l)
|
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)
|
DHTControlActivity[] |
getActivities()
|
List<DHTTransportContact> |
getClosestContactsList(byte[] id,
int num_to_return,
boolean live_only)
|
List<DHTTransportContact> |
getClosestKContactsList(byte[] id,
boolean live_only)
|
List<DHTControlContact> |
getContacts()
|
DHTDB |
getDataBase()
|
DHTTransportValue |
getLocalValue(byte[] key)
|
byte[] |
getObfuscatedKey(byte[] plain_key)
|
DHTRouter |
getRouter()
|
DHTControlStats |
getStats()
|
List<DHTTransportValue> |
getStoredValues(byte[] key)
|
DHTTransport |
getTransport()
|
void |
importState(DataInputStream is)
|
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,
DHTOperationListener listener)
|
byte[] |
remove(DHTTransportContact[] contacts,
byte[] key,
String description,
DHTOperationListener listener)
|
void |
removeListener(DHTControlListener l)
|
void |
seed(boolean full_wait)
|
void |
setSeeded()
Manually mark things as seeded |
void |
setSleeping(boolean asleep)
|
void |
setSuspended(boolean susp)
|
boolean |
verifyContact(DHTTransportContact c,
boolean direct)
|
K_DEFAULT
static final int K_DEFAULT
- See Also:
- Constant Field Values
B_DEFAULT
static final int B_DEFAULT
- See Also:
- Constant Field Values
MAX_REP_PER_NODE_DEFAULT
static final int MAX_REP_PER_NODE_DEFAULT
- See Also:
- Constant Field Values
SEARCH_CONCURRENCY_DEFAULT
static final int SEARCH_CONCURRENCY_DEFAULT
- See Also:
- Constant Field Values
LOOKUP_CONCURRENCY_DEFAULT
static final int LOOKUP_CONCURRENCY_DEFAULT
- See Also:
- Constant Field Values
CACHE_AT_CLOSEST_N_DEFAULT
static final int CACHE_AT_CLOSEST_N_DEFAULT
- See Also:
- Constant Field Values
ORIGINAL_REPUBLISH_INTERVAL_DEFAULT
static final int ORIGINAL_REPUBLISH_INTERVAL_DEFAULT
- See Also:
- Constant Field Values
CACHE_REPUBLISH_INTERVAL_DEFAULT
static final int CACHE_REPUBLISH_INTERVAL_DEFAULT
- See Also:
- Constant Field Values
ENCODE_KEYS_DEFAULT
static final int ENCODE_KEYS_DEFAULT
- See Also:
- Constant Field Values
ENABLE_RANDOM_DEFAULT
static final int ENABLE_RANDOM_DEFAULT
- See Also:
- Constant Field Values
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
DHTTransportValue getLocalValue(byte[] key)
getStoredValues
List<DHTTransportValue> getStoredValues(byte[] key)
get
void get(byte[] key,
String description,
short flags,
int max_values,
long timeout,
boolean exhaustive,
boolean high_priority,
DHTOperationListener listener)
remove
byte[] remove(byte[] key,
String description,
DHTOperationListener listener)
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
void exportState(DataOutputStream os,
int max)
throws IOException
- Throws:
IOException
importState
void importState(DataInputStream is)
throws IOException
- Throws:
IOException
getClosestKContactsList
List<DHTTransportContact> getClosestKContactsList(byte[] id,
boolean live_only)
getClosestContactsList
List<DHTTransportContact> getClosestContactsList(byte[] id,
int num_to_return,
boolean live_only)
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
boolean verifyContact(DHTTransportContact c,
boolean direct)
lookup
boolean lookup(byte[] id,
String description,
long timeout,
DHTOperationListener listener)
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
void addListener(DHTControlListener l)
removeListener
void removeListener(DHTControlListener l)
destroy
void destroy()
print
void print(boolean full)