Task #7636
Story #7635: thread-safety in libclient_java
make singletons thread-safe
100%
Description
Make sure the singletons in d1_libclient_java are thread-safe
v1.D1Client
v2.D1Client
auth.CertificateManager
see http://stackoverflow.com/questions/7048198/thread-safe-singletons-in-java
History
#1 Updated by Rob Nahf almost 9 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.
#2 Updated by Rob Nahf almost 9 years ago
DataoneEMLParser is a singleton, but with negligible consequence for accidentally having two instantiations. Skipping refactoring.
#3 Updated by Rob Nahf almost 9 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.
#4 Updated by Rob Nahf over 8 years ago
- Status changed from In Progress to Closed
- translation missing: en.field_remaining_hours set to 0.0
- % Done changed from 30 to 100
progress made took care of the low-hanging fruit.