3 Some interfaces that are used by the apt-dht classes.
7 from zope.interface import Interface
10 """An abstract interface for using a DHT implementation."""
12 def loadConfig(self, config, section):
13 """Load the DHTs configuration from a dictionary.
15 @type config: C{SafeConfigParser}
16 @param config: the dictionary of config values
20 """Bootstrap the new DHT node into the DHT.
23 @return: a deferred that will fire when the node has joined
27 """Depart gracefully from the DHT.
30 @return: a deferred that will fire when the node has left
33 def getValue(self, key):
34 """Get a value from the DHT for the specified key.
37 @return: a deferred that will fire with the stored values
40 def storeValue(self, key, value):
41 """Store a value in the DHT for the specified key."""