}
/**
- * Initializes the distributable hash table (DHT)
+ * Initializes the distributed hash table (DHT)
*
* @return void
* @todo Please implement this method
*/
public function initDht () {
- $this->partialStub('Please implement this method.');
+ // Is the local node registered?
+ if ($this->getWrapperInstance()->isLocalNodeRegistered()) {
+ // Then only update session id
+ $this->getWrapperInstance()->updateLocalNode();
+ } else {
+ // No, so register it
+ $this->getWrapperInstance()->registerLocalNode();
+ }
}
}