Story #7635: thread-safety in libclient_java
make singletons thread-safe
Make sure the singletons in d1_libclient_java are thread-safe
#1 Updated by Rob Nahf over 6 years ago
- Description updated (diff)
- % Done changed from 0 to 30
- Status changed from New to In Progress
CertificateManager holds a registry of nodes that should be universal - it would be confusing to have two instantiations of CertificateManager each holding half of the registry.
Refactoring to implement the SingletonHelper approach.
#3 Updated by Rob Nahf over 6 years ago
refactored CertificateManager and ObjectFormatCache getInstance() methods as per above.
In ObjectFormatCache, made the refreshCache method synchronized, and the map a ConcurrentHashMap.
ObjectFormatInfo singleton has a reload() method that might make doing the same for that class difficult.