logo
  • 教程列表
  • SO官方文档
  • Java SDK
    • 将 SDK 添加到项目中
    • 连接到一个桶
    • DB 中存在检查文档
    • 使用 TTL 创建文档(生存时间)
  1. StackOverflow 文档
  2. couchbase 教程
  3. Java SDK
  4. 连接到一个桶

连接到一个桶

Created: November-22, 2018

String bucketName = "default";
String bucketPassword = "";
List<String> nodes = Arrays.asList("127.0.0.1"); // IP or hostname of one or more nodes in the cluster

Cluster cluster = CouchbaseCluster.create(nodes);
Bucket bucket = cluster.openBucket(bucketName, bucketPassword);
  • DB 中存在检查文档
  • 将 SDK 添加到项目中

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明