/** * {@inheritdoc} */ public function execute(RiakTransport $adapter) { $request = $this->createRequest(); $response = $adapter->send($request); $iterator = new ListBucketsIterator($response->iterator); return new ListBucketsResponse($iterator); }
/** * {@inheritdoc} */ public function execute(RiakTransport $adapter) { $request = $this->createRequest(); $response = $adapter->send($request); $iterator = new ListKeysLocationIterator($this->namespace, $response->iterator); return new ListKeysResponse($iterator); }
/** * {@inheritdoc} */ public function execute(RiakTransport $adapter) { $request = $this->createMapReduceRequest(); $response = $adapter->send($request); $iterator = new MapReduceEntryIterator($response->iterator); return $this->createMapReduceResponse($iterator); }
/** * {@inheritdoc} */ public function execute(RiakTransport $adapter) { $getRequest = $this->createGetRequest(); $getResponse = $adapter->send($getRequest); $bucketProps = $this->createBucketProps($getResponse); $response = new FetchBucketPropertiesResponse($this->namespace, $bucketProps); return $response; }
/** * {@inheritdoc} */ public function execute(RiakTransport $adapter) { $request = $this->createIndexQueryRequest(); $namespace = $this->query->getNamespace(); $response = $adapter->send($request); $iterator = new IndexEntryIterator($namespace, $response->iterator); return new IndexQueryResponse($namespace, $iterator, $response->continuation); }
/** * {@inheritdoc} */ public function execute(RiakTransport $adapter) { $putRequest = $this->createGetRequest(); $putResponse = $adapter->send($putRequest); $datatype = $this->converter->convert($putResponse); $response = $this->createDataTypeResponse($datatype, $putResponse->context); return $response; }
/** * {@inheritdoc} */ public function execute(RiakTransport $adapter) { $schema = null; $response = $adapter->send($this->createGetIndexRequest()); if ($response && $response->name) { $schema = new YokozunaIndex($response->name, $response->schema); $schema->setNVal($response->nVal); } return new FetchIndexResponse($schema); }
/** * {@inheritdoc} */ public function execute(RiakTransport $adapter) { $putRequest = $this->createDeleteRequest(); $putResponse = $adapter->send($putRequest); $resolverFactory = $this->config->getResolverFactory(); $converterFactory = $this->config->getConverterFactory(); $objectConverter = $this->config->getRiakObjectConverter(); $vClock = $putResponse->vClock; $contentList = $putResponse->contentList; $values = $objectConverter->convertToRiakObjectList($contentList, $vClock); $response = new DeleteValueResponse($converterFactory, $resolverFactory, $this->location, $values); return $response; }
/** * {@inheritdoc} */ public function execute(RiakTransport $adapter) { $getRequest = $this->createGetRequest(); $getResponse = $adapter->send($getRequest); $resolverFactory = $this->config->getResolverFactory(); $converterFactory = $this->config->getConverterFactory(); $objectConverter = $this->config->getRiakObjectConverter(); $vClock = $getResponse->vClock; $unchanged = $getResponse->unchanged; $contentList = $getResponse->contentList; $notFound = empty($getResponse->contentList); $objectList = $objectConverter->convertToRiakObjectList($contentList, $vClock); $response = new FetchValueResponse($converterFactory, $resolverFactory, $this->location, $objectList); $response->setNotFound($notFound); $response->setUnchanged($unchanged); return $response; }
/** * {@inheritdoc} */ public function execute(RiakTransport $adapter) { $adapter->send($this->createPutIndexRequest()); return new StoreIndexResponse(); }
/** * {@inheritdoc} */ public function execute(RiakTransport $adapter) { $response = $adapter->send($this->createGetSchemaRequest()); $schema = $response && $response->name ? new YokozunaSchema($response->name, $response->content) : null; return new FetchSchemaResponse($schema); }
/** * {@inheritdoc} */ public function execute(RiakTransport $adapter) { $response = $adapter->send($this->createGetSearchRequest()); return new SearchResponse($response->docs, $response->maxScore, $response->numFound); }
/** * {@inheritdoc} */ public function execute(RiakTransport $adapter) { $adapter->send($this->createGetRequest()); return new StoreBucketPropertiesResponse($this->namespace); }