|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.aelitis.azureus.core.dht.impl.DHTImpl
public class DHTImpl
Field Summary |
---|
Constructor Summary | |
---|---|
DHTImpl(DHTTransport _transport,
DHTRouter _router,
DHTDB _database,
java.util.Properties _properties,
DHTStorageAdapter _storage_adapter,
DHTLogger _logger)
|
|
DHTImpl(DHTTransport _transport,
java.util.Properties _properties,
DHTStorageAdapter _storage_adapter,
DHTNATPuncherAdapter _nat_adapter,
DHTLogger _logger)
|
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()
|
protected int |
getProp(java.lang.String name,
int def)
|
DHTRouter |
getRouter()
|
DHTSpeedTester |
getSpeedTester()
|
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 |
runStateChanged(long run_state)
|
void |
setLogging(boolean on)
|
void |
setSuspended(boolean susp)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DHTImpl(DHTTransport _transport, java.util.Properties _properties, DHTStorageAdapter _storage_adapter, DHTNATPuncherAdapter _nat_adapter, DHTLogger _logger)
public DHTImpl(DHTTransport _transport, DHTRouter _router, DHTDB _database, java.util.Properties _properties, DHTStorageAdapter _storage_adapter, DHTLogger _logger)
Method Detail |
---|
public void runStateChanged(long run_state)
runStateChanged
in interface AERunStateHandler.RunStateChangeListener
public boolean isSleeping()
isSleeping
in interface DHT
public void setSuspended(boolean susp)
setSuspended
in interface DHT
protected int getProp(java.lang.String name, int def)
public int getIntProperty(java.lang.String name)
getIntProperty
in interface DHT
public boolean isDiversified(byte[] key)
isDiversified
in interface DHT
public void put(byte[] key, java.lang.String description, byte[] value, short flags, DHTOperationListener listener)
put
in interface DHT
public void put(byte[] key, java.lang.String description, byte[] value, short flags, boolean high_priority, DHTOperationListener listener)
DHT
put
in interface DHT
public void put(byte[] key, java.lang.String description, byte[] value, short flags, byte life_hours, boolean high_priority, DHTOperationListener listener)
put
in interface DHT
public void put(byte[] key, java.lang.String description, byte[] value, short flags, byte life_hours, byte replication_control, boolean high_priority, DHTOperationListener listener)
put
in interface DHT
public DHTTransportValue getLocalValue(byte[] key)
DHT
getLocalValue
in interface DHT
public java.util.List<DHTTransportValue> getStoredValues(byte[] key)
getStoredValues
in interface DHT
public void get(byte[] key, java.lang.String description, short flags, int max_values, long timeout, boolean exhaustive, boolean high_priority, DHTOperationListener listener)
get
in interface DHT
public byte[] remove(byte[] key, java.lang.String description, DHTOperationListener listener)
remove
in interface DHT
public byte[] remove(DHTTransportContact[] contacts, byte[] key, java.lang.String description, DHTOperationListener listener)
remove
in interface DHT
public DHTTransport getTransport()
getTransport
in interface DHT
public DHTRouter getRouter()
getRouter
in interface DHT
public DHTControl getControl()
getControl
in interface DHT
public DHTDB getDataBase()
getDataBase
in interface DHT
public DHTNATPuncher getNATPuncher()
getNATPuncher
in interface DHT
public DHTSpeedTester getSpeedTester()
public DHTStorageAdapter getStorageAdapter()
getStorageAdapter
in interface DHT
public void integrate(boolean full_wait)
DHT
integrate
in interface DHT
public void destroy()
destroy
in interface DHT
public void exportState(java.io.DataOutputStream os, int max) throws java.io.IOException
DHT
exportState
in interface DHT
max
- maximum to export, 0 -> all
java.io.IOException
public void importState(java.io.DataInputStream is) throws java.io.IOException
DHT
importState
in interface DHT
java.io.IOException
public void setLogging(boolean on)
setLogging
in interface DHT
public DHTLogger getLogger()
getLogger
in interface DHT
public void print(boolean full)
print
in interface DHT
public void addListener(DHTListener listener)
addListener
in interface DHT
public void removeListener(DHTListener listener)
removeListener
in interface DHT
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |