Firestore Spring 应用程序的连接池
Similar to Spring Data, can connection pooling be done on Firestore/CollectionReference. The quickstart shows steps to create connections for reading/writing, but could not locate if these Java objects support concurrency.
Not: referring Database Connection pool , not http pooling.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
连接池允许您重用创建成本高昂的对象。 Firestore SDK 已经在幕后重用了此类对象,并且既没有必要也没有办法影响它。
Firestore 对象本身已由 SDK 缓存,或者至少其昂贵的内部结构已缓存。
CollectionReference
对象是数据库中路径的轻量级包装器,因此创建起来很便宜。Connection pooling allows you to re-use objects that are expensive to create. The Firestore SDK already re-uses such objects behind the scenes, and there's neither a need nor a way to influence this.
The Firestore object itself is already cached by the SDK, or at least its expensive internals are. A
CollectionReference
object is lightweight wrapper for a path in the database, so it's cheap to create.