function initDht ();
/**
- * Finds a node by given session id
+ * Bootstraps the DHT by sending out a message to all available nodes
+ * (including itself). This step helps the node to get to know more nodes
+ * which can be queried later for object distribution.
+ *
+ * @return void
+ */
+ function bootstrapDht ();
+
+ /**
+ * Finds a node locally by given session id
*
* @param $sessionId Session id to lookup
- * @return $nodeData Node data array
+ * @return $nodeData Node-data array
*/
- function findNodeBySessionId ($sessionId);
+ function findNodeLocalBySessionId ($sessionId);
/**
* Registers an other node with this node by given message data. The
* Queries the local DHT data(base) for a node list with all supported
* object types except the node by given session id.
*
- * @param $messageData An array with message data from a node_list request
- * @return $nodeList An array with all found nodes
+ * @param $messageData An array with message data from a node_list request
+ * @param $handlerInstance An instance of a Handleable class
+ * @param $excludeKey Array key which should be excluded
+ * @param $andKey Array of $separator-separated list of elements which all must match
+ * @param $separator Sepator char (1st parameter for explode() call)
+ * @return $nodeList An array with all found nodes
+ */
+ function queryLocalNodeListExceptByMessageData (array $messageData, Handleable $handlerInstance, $excludeKey, $andKey, $separator);
+
+ /**
+ * Inserts given node list array (from earlier database result produced by
+ * an other node) into the DHT. This array origins from above method
+ * queryLocalNodeListExceptByMessageData().
+ *
+ * @param $nodeList An array from an earlier database result instance
+ * @return void
+ */
+ function insertNodeList (array $nodeList);
+
+ /**
+ * Updates/refreshes DHT data (e.g. status).
+ *
+ * @return void
*/
- function queryLocalNodeListExceptByMessageData (array $messageData);
+ function updateDhtData ();
}
// [EOF]