class ViewLocator extends RoundRobinLocator {

  @Override
  protected boolean nodeCanBeUsed(final Node node, final Request<? extends Response> request,
                                  final ClusterConfig config) {
    if (request instanceof ScopedRequest
      && config.bucketConfig(((ScopedRequest) request).bucket()) instanceof CouchbaseBucketConfig) {
        return ((CouchbaseBucketConfig) config.bucketConfig(((ScopedRequest) request).bucket()))
          .hasPrimaryPartitionsOnNode(node.identifier().address());
    }
    return false;
  }

  public  ViewLocator();

}