Package com.biglybt.core.dht
Interface DHT
- All Known Implementing Classes:
DHTImpl
public interface DHT
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte
static final byte
static final byte
static final String[]
static final short
static final short
static final short
static final short
static final short
static final short
static final short
static final short
static final short
static final short
static final short
static final short
static final short
static final int
static final int
static final int
static final int
static final int
static final int
Deprecated.Use NW_AZ_MAINstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final byte
static final byte
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(DHTListener listener) void
destroy()
void
exportState
(DataOutputStream os, int max) externalises information that allows the DHT to be recreated at a later date and populated via the import methodvoid
get
(byte[] key, String description, short flags, int max_values, long timeout, boolean exhaustive, boolean high_priority, DHTOperationListener listener) int
getIntProperty
(String name) getLocalValue
(byte[] key) Returns value if originated from here for keygetStoredValues
(byte[] key) void
populate the DHT with previously exported statevoid
integrate
(boolean full_wait) Integrate the node into the DHT Can be invoked more than once if additional state is importedboolean
isDiversified
(byte[] key) boolean
void
print
(boolean full) void
put
(byte[] key, String description, byte[] value, short flags, boolean high_priority, DHTOperationListener listener) default is HIGH PRIORITY.void
put
(byte[] key, String description, byte[] value, short flags, byte life_hours, boolean high_priority, DHTOperationListener listener) void
put
(byte[] key, String description, byte[] value, short flags, byte life_hours, byte replication_control, boolean high_priority, DHTOperationListener listener) void
put
(byte[] key, String description, byte[] value, short flags, DHTOperationListener listener) default 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
removeListener
(DHTListener listener) void
setLogging
(boolean on) void
setSuspended
(boolean susp)
-
Field Details
-
PR_CONTACTS_PER_NODE
- See Also:
-
PR_NODE_SPLIT_FACTOR
- See Also:
-
PR_SEARCH_CONCURRENCY
- See Also:
-
PR_LOOKUP_CONCURRENCY
- See Also:
-
PR_MAX_REPLACEMENTS_PER_NODE
- See Also:
-
PR_CACHE_AT_CLOSEST_N
- See Also:
-
PR_ORIGINAL_REPUBLISH_INTERVAL
- See Also:
-
PR_CACHE_REPUBLISH_INTERVAL
- See Also:
-
PR_ENCODE_KEYS
- See Also:
-
PR_ENABLE_RANDOM_LOOKUP
- See Also:
-
FLAG_NONE
static final short FLAG_NONE- See Also:
-
FLAG_SINGLE_VALUE
static final short FLAG_SINGLE_VALUE- See Also:
-
FLAG_DOWNLOADING
static final short FLAG_DOWNLOADING- See Also:
-
FLAG_SEEDING
static final short FLAG_SEEDING- See Also:
-
FLAG_MULTI_VALUE
static final short FLAG_MULTI_VALUE- See Also:
-
FLAG_STATS
static final short FLAG_STATS- See Also:
-
FLAG_ANON
static final short FLAG_ANON- See Also:
-
FLAG_PRECIOUS
static final short FLAG_PRECIOUS- See Also:
-
FLAG_BRIDGED
static final short FLAG_BRIDGED- See Also:
-
FLAG_PUT_AND_FORGET
static final short FLAG_PUT_AND_FORGET- See Also:
-
FLAG_OBFUSCATE_LOOKUP
static final short FLAG_OBFUSCATE_LOOKUP- See Also:
-
FLAG_LOOKUP_FOR_STORE
static final short FLAG_LOOKUP_FOR_STORE- See Also:
-
FLAG_HIGH_PRIORITY
static final short FLAG_HIGH_PRIORITY- See Also:
-
MAX_VALUE_SIZE
static final int MAX_VALUE_SIZE- See Also:
-
REP_FACT_NONE
static final byte REP_FACT_NONE- See Also:
-
REP_FACT_DEFAULT
static final byte REP_FACT_DEFAULT- See Also:
-
DT_NONE
static final byte DT_NONE- See Also:
-
DT_FREQUENCY
static final byte DT_FREQUENCY- See Also:
-
DT_SIZE
static final byte DT_SIZE- See Also:
-
DT_STRINGS
-
NW_MAIN
static final int NW_MAINDeprecated.Use NW_AZ_MAIN- See Also:
-
NW_AZ_MAIN
static final int NW_AZ_MAIN- See Also:
-
NW_AZ_CVS
static final int NW_AZ_CVS- See Also:
-
NW_AZ_MAIN_V6
static final int NW_AZ_MAIN_V6- See Also:
-
NW_BIGLYBT_MAIN
static final int NW_BIGLYBT_MAIN- See Also:
-
-
Method Details
-
put
-
put
void put(byte[] key, String description, byte[] value, short flags, boolean high_priority, DHTOperationListener listener) default is HIGH PRIORITY. if you change to low priority then do so consistently as operations can get out of order otherwise- Parameters:
key
-description
-value
-flags
-high_priority
-listener
-
-
put
void put(byte[] key, String description, byte[] value, short flags, byte life_hours, boolean high_priority, DHTOperationListener listener) -
put
void put(byte[] key, String description, byte[] value, short flags, byte life_hours, byte replication_control, boolean high_priority, DHTOperationListener listener) -
getLocalValue
Returns value if originated from here for key- Parameters:
key
-- Returns:
-
getStoredValues
-
get
void get(byte[] key, String description, short flags, int max_values, long timeout, boolean exhaustive, boolean high_priority, DHTOperationListener listener) - Parameters:
key
-max_values
-timeout
-listener
-
-
remove
-
remove
-
remove
byte[] remove(DHTTransportContact[] contacts, byte[] key, String description, DHTOperationListener listener) -
isDiversified
boolean isDiversified(byte[] key) -
getIntProperty
-
getTransport
DHTTransport getTransport() -
getRouter
DHTRouter getRouter() -
getControl
DHTControl getControl() -
getDataBase
DHTDB getDataBase() -
getNATPuncher
DHTNATPuncher getNATPuncher() -
getStorageAdapter
DHTStorageAdapter getStorageAdapter() -
exportState
externalises information that allows the DHT to be recreated at a later date and populated via the import method- Parameters:
os
-max
- maximum to export, 0 -> all- Throws:
IOException
-
importState
populate the DHT with previously exported state- Parameters:
is
-- Throws:
IOException
-
integrate
void integrate(boolean full_wait) Integrate the node into the DHT Can be invoked more than once if additional state is imported -
setSuspended
void setSuspended(boolean susp) -
destroy
void destroy() -
isSleeping
boolean isSleeping() -
setLogging
void setLogging(boolean on) -
getLogger
DHTLogger getLogger() -
print
void print(boolean full) -
addListener
-
removeListener
-