Interface DHTControl
- All Known Implementing Classes:
DHTControlImpl
public interface DHTControl
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionvoidintcompareDistances(byte[] n1, byte[] n2) intcomputeAndCompareDistances(byte[] n1, byte[] n2, byte[] pivot) byte[]computeDistance(byte[] n1, byte[] n2) voiddestroy()voidexportState(DataOutputStream os, int max) voidget(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) voidbooleanisDiversified(byte[] key) booleanisSeeded()booleanlookup(byte[] id, String description, long timeout, DHTOperationListener listener) booleanlookupEncoded(byte[] id, String description, long timeout, boolean high_priority, DHTOperationListener listener) voidpingAll()voidprint(boolean full) voidput(byte[] key, String description, byte[] value, short flags, byte life_hours, byte replication_control, boolean high_priority, DHTOperationListener listener) voidputDirectEncodedKeys(byte[][] keys, String description, DHTTransportValue[][] value_sets, DHTTransportContact contact, DHTOperationListener listener) voidputDirectEncodedKeys(byte[][] keys, String description, DHTTransportValue[][] value_sets, List<DHTTransportContact> contacts) voidputEncodedKey(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) voidvoidseed(boolean full_wait) voidManually mark things as seededvoidsetSleeping(boolean asleep) voidsetSuspended(boolean susp) booleanverifyContact(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)
-