|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DHT
Field Summary | |
---|---|
static byte |
DT_FREQUENCY
|
static byte |
DT_NONE
|
static byte |
DT_SIZE
|
static java.lang.String[] |
DT_STRINGS
|
static short |
FLAG_ANON
|
static short |
FLAG_BRIDGED
|
static short |
FLAG_DOWNLOADING
|
static short |
FLAG_HIGH_PRIORITY
|
static short |
FLAG_LOOKUP_FOR_STORE
|
static short |
FLAG_MULTI_VALUE
|
static short |
FLAG_NONE
|
static short |
FLAG_OBFUSCATE_LOOKUP
|
static short |
FLAG_PRECIOUS
|
static short |
FLAG_PUT_AND_FORGET
|
static short |
FLAG_SEEDING
|
static short |
FLAG_SINGLE_VALUE
|
static short |
FLAG_STATS
|
static int |
MAX_VALUE_SIZE
|
static int |
NW_CVS
|
static int |
NW_MAIN
|
static int |
NW_MAIN_V6
|
static java.lang.String |
PR_CACHE_AT_CLOSEST_N
|
static java.lang.String |
PR_CACHE_REPUBLISH_INTERVAL
|
static java.lang.String |
PR_CONTACTS_PER_NODE
|
static java.lang.String |
PR_ENABLE_RANDOM_LOOKUP
|
static java.lang.String |
PR_ENCODE_KEYS
|
static java.lang.String |
PR_LOOKUP_CONCURRENCY
|
static java.lang.String |
PR_MAX_REPLACEMENTS_PER_NODE
|
static java.lang.String |
PR_NODE_SPLIT_FACTOR
|
static java.lang.String |
PR_ORIGINAL_REPUBLISH_INTERVAL
|
static java.lang.String |
PR_SEARCH_CONCURRENCY
|
static byte |
REP_FACT_DEFAULT
|
static byte |
REP_FACT_NONE
|
Method Summary | |
---|---|
void |
addListener(DHTListener listener)
|
void |
destroy()
|
void |
exportState(java.io.DataOutputStream os,
int max)
externalises information that allows the DHT to be recreated at a later date and populated via the import method |
void |
get(byte[] key,
java.lang.String description,
short flags,
int max_values,
long timeout,
boolean exhaustive,
boolean high_priority,
DHTOperationListener listener)
|
DHTControl |
getControl()
|
DHTDB |
getDataBase()
|
int |
getIntProperty(java.lang.String name)
|
DHTTransportValue |
getLocalValue(byte[] key)
Returns value if originated from here for key |
DHTLogger |
getLogger()
|
DHTNATPuncher |
getNATPuncher()
|
DHTRouter |
getRouter()
|
DHTStorageAdapter |
getStorageAdapter()
|
java.util.List<DHTTransportValue> |
getStoredValues(byte[] key)
|
DHTTransport |
getTransport()
|
void |
importState(java.io.DataInputStream is)
populate the DHT with previously exported state |
void |
integrate(boolean full_wait)
Integrate the node into the DHT Can be invoked more than once if additional state is imported |
boolean |
isDiversified(byte[] key)
|
boolean |
isSleeping()
|
void |
print(boolean full)
|
void |
put(byte[] key,
java.lang.String description,
byte[] value,
short flags,
boolean high_priority,
DHTOperationListener listener)
default is HIGH PRIORITY. |
void |
put(byte[] key,
java.lang.String description,
byte[] value,
short flags,
byte life_hours,
boolean high_priority,
DHTOperationListener listener)
|
void |
put(byte[] key,
java.lang.String description,
byte[] value,
short flags,
byte life_hours,
byte replication_control,
boolean high_priority,
DHTOperationListener listener)
|
void |
put(byte[] key,
java.lang.String description,
byte[] value,
short flags,
DHTOperationListener listener)
|
byte[] |
remove(byte[] key,
java.lang.String description,
DHTOperationListener listener)
|
byte[] |
remove(DHTTransportContact[] contacts,
byte[] key,
java.lang.String description,
DHTOperationListener listener)
|
void |
removeListener(DHTListener listener)
|
void |
setLogging(boolean on)
|
void |
setSuspended(boolean susp)
|
Field Detail |
---|
static final java.lang.String PR_CONTACTS_PER_NODE
static final java.lang.String PR_NODE_SPLIT_FACTOR
static final java.lang.String PR_SEARCH_CONCURRENCY
static final java.lang.String PR_LOOKUP_CONCURRENCY
static final java.lang.String PR_MAX_REPLACEMENTS_PER_NODE
static final java.lang.String PR_CACHE_AT_CLOSEST_N
static final java.lang.String PR_ORIGINAL_REPUBLISH_INTERVAL
static final java.lang.String PR_CACHE_REPUBLISH_INTERVAL
static final java.lang.String PR_ENCODE_KEYS
static final java.lang.String PR_ENABLE_RANDOM_LOOKUP
static final short FLAG_NONE
static final short FLAG_SINGLE_VALUE
static final short FLAG_DOWNLOADING
static final short FLAG_SEEDING
static final short FLAG_MULTI_VALUE
static final short FLAG_STATS
static final short FLAG_ANON
static final short FLAG_PRECIOUS
static final short FLAG_BRIDGED
static final short FLAG_PUT_AND_FORGET
static final short FLAG_OBFUSCATE_LOOKUP
static final short FLAG_LOOKUP_FOR_STORE
static final short FLAG_HIGH_PRIORITY
static final int MAX_VALUE_SIZE
static final byte REP_FACT_NONE
static final byte REP_FACT_DEFAULT
static final byte DT_NONE
static final byte DT_FREQUENCY
static final byte DT_SIZE
static final java.lang.String[] DT_STRINGS
static final int NW_MAIN
static final int NW_CVS
static final int NW_MAIN_V6
Method Detail |
---|
void put(byte[] key, java.lang.String description, byte[] value, short flags, DHTOperationListener listener)
void put(byte[] key, java.lang.String description, byte[] value, short flags, boolean high_priority, DHTOperationListener listener)
key
- description
- value
- flags
- high_priority
- listener
- void put(byte[] key, java.lang.String description, byte[] value, short flags, byte life_hours, boolean high_priority, DHTOperationListener listener)
void put(byte[] key, java.lang.String description, byte[] value, short flags, byte life_hours, byte replication_control, boolean high_priority, DHTOperationListener listener)
DHTTransportValue getLocalValue(byte[] key)
key
-
java.util.List<DHTTransportValue> getStoredValues(byte[] key)
void get(byte[] key, java.lang.String description, short flags, int max_values, long timeout, boolean exhaustive, boolean high_priority, DHTOperationListener listener)
key
- max_values
- timeout
- listener
- byte[] remove(byte[] key, java.lang.String description, DHTOperationListener listener)
byte[] remove(DHTTransportContact[] contacts, byte[] key, java.lang.String description, DHTOperationListener listener)
boolean isDiversified(byte[] key)
int getIntProperty(java.lang.String name)
DHTTransport getTransport()
DHTRouter getRouter()
DHTControl getControl()
DHTDB getDataBase()
DHTNATPuncher getNATPuncher()
DHTStorageAdapter getStorageAdapter()
void exportState(java.io.DataOutputStream os, int max) throws java.io.IOException
os
- max
- maximum to export, 0 -> all
java.io.IOException
void importState(java.io.DataInputStream is) throws java.io.IOException
is
-
java.io.IOException
void integrate(boolean full_wait)
void setSuspended(boolean susp)
void destroy()
boolean isSleeping()
void setLogging(boolean on)
DHTLogger getLogger()
void print(boolean full)
void addListener(DHTListener listener)
void removeListener(DHTListener listener)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |