// Update DHT database record
$this->queryUpdateDataSet($dataSetInstance);
}
+
+ /**
+ * Finds a node by given session id
+ *
+ * @param $sessionId Session id to lookup
+ * @return $nodeData Node data array
+ */
+ public function findNodeBySessionId ($sessionId) {
+ // Get search criteria
+ $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
+
+ // Get node instance
+ $nodeInstance = Registry::getRegistry()->getInstance('node');
+
+ // Search for session id and limit it to one entry
+ $searchInstance->addCriteria(self::DB_COLUMN_SESSION_ID, $nodeInstance->getSessionId());
+ $searchInstance->setLimit(1);
+
+ // Query database and get a result instance back
+ $resultInstance = $this->doSelectByCriteria($searchInstance);
+
+ // Return result instance
+ return $resultInstance;
+ }
}
// [EOF]