modules/acm/src/DatabaseSessionStore.php
protected function setOwnerReference($uid, $owner_id) {
    $key = $uid . ':' . self::OWNER_REFERENCE_NAMESPACE;
    if (!$this->lockBackend->acquire($key)) {
      $this->lockBackend->wait($key);
      if (!$this->lockBackend->acquire($key)) {
        throw new TempStoreException("Couldn't acquire lock to update item '$key' in '{$this->storage->getCollectionName()}' temporary storage.");
      }
    }

    $value = (object) [
      'owner' => $uid,
      'data' => $owner_id,
      'updated' => (int) $this->requestStack->getMasterRequest()->server->get('REQUEST_TIME'),
    ];
    $this->storage->setWithExpire($key, $value, $this->expire);
    $this->lockBackend->release($key);
  }
protected function setOwnerReference($uid, $owner_id) {
    $key = $uid . ':' . self::OWNER_REFERENCE_NAMESPACE;
    if (!$this->lockBackend->acquire($key)) {
      $this->lockBackend->wait($key);
      if (!$this->lockBackend->acquire($key)) {
        throw new TempStoreException("Couldn't acquire lock to update item '$key' in '{$this->storage->getCollectionName()}' temporary storage.");
      }
    }

    $value = (object) [
      'owner' => $uid,
      'data' => $owner_id,
      'updated' => (int) $this->requestStack->getMasterRequest()->server->get('REQUEST_TIME'),
    ];
    $this->storage->setWithExpire($key, $value, $this->expire);
    $this->lockBackend->release($key);
  }
protected function setOwnerReference ( $ uid , $ owner_id ) { $ key = $ uid . ':' . self :: OWNER_REFERENCE_NAMESPACE ; if ( ! $ this -> lockBackend -> acquire ( $ key ) ) { $ this -> lockBackend -> wait ( $ key ) ; if ( ! $ this -> lockBackend -> acquire ( $ key ) ) { throw new TempStoreException ( "Couldn't acquire lock to update item '$key' in '{$this->storage->getCollectionName()}' temporary storage." ) ; } } $ value = ( object ) [ 'owner' => $ uid , 'data' => $ owner_id , 'updated' => ( int ) $ this -> requestStack -> getMasterRequest ( ) -> server -> get ( 'REQUEST_TIME' ) , ] ; $ this -> storage -> setWithExpire ( $ key , $ value , $ this -> expire ) ; $ this -> lockBackend -> release ( $ key ) ; }
Stores a reference to the current store owner for a particular user.

@param string $uid
The user id to relate to the current store.
@param string $owner_id
The store owner to associate this user to.

@throws \Drupal\Core\TempStore\TempStoreException
Thrown when a lock for the backend storage could not be acquired.
Stores a reference to the current store owner for a particular user .