Spanner/src/Session/CacheSessionPool.php
public function setDatabase(Database $database)
    {
        $this->database = $database;
        $identity = $database->identity();
        $this->cacheKey = sprintf(
            self::CACHE_KEY_TEMPLATE,
            $identity['projectId'],
            $identity['instance'],
            $identity['database']
        );

        if (!isset($this->config['lock'])) {
            $this->config['lock'] = $this->getDefaultLock();
        }
    }
public function setDatabase(Database $database)
    {
        $this->database = $database;
        $identity = $database->identity();
        $this->cacheKey = sprintf(
            self::CACHE_KEY_TEMPLATE,
            $identity['projectId'],
            $identity['instance'],
            $identity['database']
        );

        if (!isset($this->config['lock'])) {
            $this->config['lock'] = $this->getDefaultLock();
        }
    }
public function setDatabase ( Database $ database ) { $ this -> database = $ database ; $ identity = $ database -> identity ( ) ; $ this -> cacheKey = sprintf ( self :: CACHE_KEY_TEMPLATE , $ identity [ 'projectId' ] , $ identity [ 'instance' ] , $ identity [ 'database' ] ) ; if ( ! isset ( $ this -> config [ 'lock' ] ) ) { $ this -> config [ 'lock' ] = $ this -> getDefaultLock ( ) ; } }
Set the database used to make calls to manage sessions.

@param Database $database The database.
Set the database used to make calls to manage sessions .