return asyncBucket
.query(query)
.map(new Func1<AsyncViewResult, ViewResult>() {
@Override
public ViewResult call(AsyncViewResult asyncViewResult) {
return new DefaultViewResult(environment, CouchbaseBucket.this,
asyncViewResult.rows(), asyncViewResult.totalRows(), asyncViewResult.success(),
asyncViewResult.error(), asyncViewResult.debug());
}
})
.timeout(timeout, timeUnit)