public function build()
    {
        if ($this->handler) {
            $handler = $this->handler;
        } elseif ($this->pdo || $this->dbCredentials) {
            $options = $this->dbCredentials;
            $options['table'] = $this->table;
            if ($this->pdo) {
                $options['pdo'] = $this->pdo;
            }
            $handler = new PdoHandler($options);
        } else {
            $handler = new FileHandler($this->locking);
        }
        return new Session($handler, $this->name, $this->savePath, $this->serializer);
    }