+
+ /**
+ * Checks whether the local (*this*) node is registered in the DHT by
+ * checking if the external ip/port is found.
+ *
+ * @return $isRegistered Whether *this* node is registered in the DHT
+ */
+ public function isLocalNodeRegistered () {
+ // Get node instance
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // Get a dataset instance
+ $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
+
+ // Add ip:port as criteria
+ $searchInstance->addCriteria(self::DB_COLUMN_IP_PORT, $nodeInstance->getAddressPort());
+ $searchInstance->setLimit(1);
+
+ // Query database and get a result instance back
+ $resultInstance = $this->doSelectByCriteria($searchInstance);
+
+ // Is there an entry?
+ $isRegistered = $resultInstance->next();
+
+ // Return result
+ return $isRegistered;
+ }
+
+ /**
+ * Updates local (*this*) node data in DHT, this is but not limited to the
+ * session id, ip number (and/or hostname) and port number.
+ *
+ * @return void
+ */
+ public function updateLocalNode () {
+ $this->partialStub('Not implemented yet.');
+ }
+
+ /**
+ * Registeres the local (*this*) node with its data in the DHT.
+ *
+ * @return void
+ */
+ public function registerLocalNode () {
+ $this->partialStub('Not implemented yet.');
+ }