public function setResource($id, $resource)
    {
        if (!($resource instanceof Redis)) {
            throw new ArchException('Not a valid redis resource');
        }
        $this->resources[(string) $id] = [
            'persistent_id' => '',
            'lib_options'   => [],
            'server'        => [],
            'password'      => '',
            'database'      => 0,
            'resource'      => $resource,
            'initialized'   => true,
            'version'       => 0,
        ];
        return $this;
    }