mmelko commented on a change in pull request #3944:
URL: https://github.com/apache/camel/pull/3944#discussion_r445527319
##########
File path:
components/camel-couchbase/src/main/java/org/apache/camel/component/couchbase/CouchbaseConsumer.java
##########
@@ -16,65 +16,76 @@
*/
package org.apache.camel.component.couchbase;
-import com.couchbase.client.CouchbaseClient;
-import com.couchbase.client.protocol.views.Query;
-import com.couchbase.client.protocol.views.View;
-import com.couchbase.client.protocol.views.ViewResponse;
-import com.couchbase.client.protocol.views.ViewRow;
+import java.util.List;
+
+import com.couchbase.client.java.Bucket;
+import com.couchbase.client.java.Collection;
+import com.couchbase.client.java.Scope;
+import com.couchbase.client.java.view.ViewOptions;
+import com.couchbase.client.java.view.ViewOrdering;
+import com.couchbase.client.java.view.ViewResult;
+import com.couchbase.client.java.view.ViewRow;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.support.DefaultScheduledPollConsumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import static
org.apache.camel.component.couchbase.CouchbaseConstants.HEADER_DESIGN_DOCUMENT_NAME;
-import static
org.apache.camel.component.couchbase.CouchbaseConstants.HEADER_ID;
-import static
org.apache.camel.component.couchbase.CouchbaseConstants.HEADER_KEY;
-import static
org.apache.camel.component.couchbase.CouchbaseConstants.HEADER_VIEWNAME;
+import static org.apache.camel.component.couchbase.CouchbaseConstants.*;
public class CouchbaseConsumer extends DefaultScheduledPollConsumer {
private static final Logger LOG =
LoggerFactory.getLogger(CouchbaseConsumer.class);
private final CouchbaseEndpoint endpoint;
- private final CouchbaseClient client;
- private final View view;
- private final Query query;
-
- public CouchbaseConsumer(CouchbaseEndpoint endpoint, CouchbaseClient
client, Processor processor) {
+ private final Bucket bucket;
+ private ViewOptions viewOptions;
+ private Collection collection;
+ public CouchbaseConsumer(CouchbaseEndpoint endpoint, Bucket client,
Processor processor) {
super(endpoint, processor);
- this.client = client;
+ this.bucket = client;
this.endpoint = endpoint;
- this.view = client.getView(endpoint.getDesignDocumentName(),
endpoint.getViewName());
- this.query = new Query();
+ Scope scope;
+ if (!endpoint.getScope().equals(DEFAULT_SCOPE)) {
Review comment:
yeah, that's a valid point. Will do.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]