com.google.cloud.datastore.Datastore线程安全吗? [英] Is com.google.cloud.datastore.Datastore thread safe?

查看:70
本文介绍了com.google.cloud.datastore.Datastore线程安全吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

com.google.cloud.datastore.Datastore 线程安全吗?更具体地说, Datastore 的一个实例可以由多个线程共享,并且它们都可以同时从Cloud Datastore读取/写入吗?

Is com.google.cloud.datastore.Datastore thread safe? More specifically, can one instance of Datastore be shared by multiple threads and can they all concurrently read from/write to the Cloud Datastore?

换句话说,如果我正在构建访问Cloud Datastore的Web应用程序,我是否需要 Datastore 对象的单个实例或 Datastore 的池对象(就像到RDBMS的JDBC连接一样)?

In other words, if I'm building a Web Application that accesses the Cloud Datastore, do I need a single instance of the Datastore object or a pool of Datastore objects (just like JDBC connections to an RDBMS)?

有问题的API是 http://googlecloudplatform.github.io/google-cloud-java/0.3.0/apidocs/.

推荐答案

是的, com.google.cloud.datastore.Datastore 是线程安全的.我们将使文档清晰明了.

Yes, com.google.cloud.datastore.Datastore is thread-safe. We will make the docs clear about it.

这篇关于com.google.cloud.datastore.Datastore线程安全吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆