-
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Expand file tree
/
Copy paththread-specific-storage.urm.puml
More file actions
41 lines (34 loc) · 901 Bytes
/
thread-specific-storage.urm.puml
File metadata and controls
41 lines (34 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@startuml
package thread-specific-storage {
class APP {
+ {static} main(args : String[]) : void
}
class Thread {
+ start() : void
}
class UserContext {
- userId : Long
+ UserContext(userId : Long)
+ getUserId() : Long
+ setUserId(userId : Long) : void
}
class UserContextProxy {
- {static} userContextHolder : ThreadLocal<UserContext>
+ {static} set(context : UserContext) : void
+ {static} get() : UserContext
+ {static} clear() : void
}
class RequestHandler {
- token : String
+ RequestHandler(token : String)
+ process() : void
- parseToken(token : String) : Long
}
UserContextProxy --> UserContext : manages
RequestHandler --> UserContextProxy : uses static
RequestHandler --> UserContext : creates
APP --> RequestHandler : creates
APP --> Thread : starts
Thread --> RequestHandler : executes
}
@enduml