1

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?

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)?

The API in question is http://googlecloudplatform.github.io/google-cloud-java/0.3.0/apidocs/.

4

1 回答 1

2

是的,com.google.cloud.datastore.Datastore是线程安全的。我们会让文档清楚地说明这一点。

于 2016-09-09T20:26:51.057 回答