Skip to content

Commit

Permalink
comments updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lilgreenbird committed Mar 26, 2024
1 parent b24ced7 commit e6b3e5f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@


/**
* ActivityCorrelator provides the APIs to access the ActivityId in TLS
* ActivityCorrelator provides the APIs to access the ActivityId in a map
*/
final class ActivityCorrelator {

private static Map<Long, ActivityId> activityIdMap = new ConcurrentHashMap<Long, ActivityId>();

static ActivityId getCurrent() {
// get the value in TLS, not reference
// get the value, not reference
@SuppressWarnings("deprecation")
long uniqueThreadId = Thread.currentThread().getId();

Expand All @@ -30,7 +30,7 @@ static ActivityId getCurrent() {
return activityIdMap.get(uniqueThreadId);
}

// Increment the Sequence number of the ActivityId in TLS
// Increment the Sequence number of the ActivityId
// and return the ActivityId with new Sequence number
static ActivityId getNext() {
return getCurrent().getIncrement();
Expand Down

0 comments on commit e6b3e5f

Please sign in to comment.