来自 com.datastax.driver.mapping 的映射器 class 是线程安全的吗?
is the mapper class from com.datastax.driver.mapping threadsafe?
似乎是这样,因为它接收到一个 Session 对象(它是线程安全的),但我找不到关于该主题的 "official" 语句
谁能确认一下?
Mapper 与驱动程序中的其他组件一样确实是线程安全的。除了始终在同步块中更新的缓存的 preparedQueries 之外,所有成员都是最终的或易变的。您有什么特别担心的事吗?
似乎是这样,因为它接收到一个 Session 对象(它是线程安全的),但我找不到关于该主题的 "official" 语句
谁能确认一下?
Mapper 与驱动程序中的其他组件一样确实是线程安全的。除了始终在同步块中更新的缓存的 preparedQueries 之外,所有成员都是最终的或易变的。您有什么特别担心的事吗?