Project

General

Profile

Task #7633

Story #7635: thread-safety in libclient_java

refactor libclient to remove synchronized from the 2 key methods

Added by Rob Nahf almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
d1_libclient_java
Target version:
Start date:
2016-02-05
Due date:
% Done:

100%

Estimated time:
0.00 h
Milestone:
None
Product Version:
*
Story Points:
Sprint:

Description

will have to keep track of latestUrl by thread. The get and setLatestUrl methods can call Thread.currentThread.getId() as a key for the latestUrl map.

The addHeader method might need to be either changed the same way, or javadoc'ed.


Subtasks

Task #7638: deprecate the RestClient header methodsClosedRob Nahf


Related issues

Related to Infrastructure - Bug #7631: synchronization not processing v1 Member Nodes Closed 2016-02-03

Associated revisions

Revision 17504
Added by Rob Nahf almost 9 years ago

refs: #7633. Removed synchronized keyword from doRequest methods. made latestUrl property thread-specific, and modified getters and setters to map the correct values. Unit test demonstrate proper behavior.

Revision 17504
Added by Rob Nahf almost 9 years ago

refs: #7633. Removed synchronized keyword from doRequest methods. made latestUrl property thread-specific, and modified getters and setters to map the correct values. Unit test demonstrate proper behavior.

History

#1 Updated by Rob Nahf almost 9 years ago

  • Parent task changed from #7631 to #7635

#2 Updated by Rob Nahf almost 9 years ago

  • Related to Bug #7631: synchronization not processing v1 Member Nodes added

#3 Updated by Rob Nahf almost 9 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 30

refactored the get/setLatestUrl to track the state of this property by Thread. Added a parameterized getLatestUrl(Thread t) method to facilitate cross-thread querying. Removed synchronized from doRequestNoBody and doRequestMMPBody. Wrote multithreaded "unit" test to visually check that the correct returns are coming out of the method.

#4 Updated by Rob Nahf almost 9 years ago

  • Status changed from In Progress to Testing
  • % Done changed from 30 to 50

#5 Updated by Rob Nahf over 8 years ago

  • Status changed from Testing to Closed
  • % Done changed from 50 to 100

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)