@@ -38,7 +38,8 @@ private[pekko] trait Children { this: ActorCell =>
38
38
private var _childrenRefsDoNotCallMeDirectly : ChildrenContainer = EmptyChildrenContainer
39
39
40
40
def childrenRefs : ChildrenContainer =
41
- Unsafe .instance.getObjectVolatile(this , AbstractActorCell .childrenOffset).asInstanceOf [ChildrenContainer ]
41
+ Unsafe .instance.getObjectVolatile(this , AbstractActorCell .childrenOffset).asInstanceOf [ChildrenContainer ]: @ nowarn(
42
+ " cat=deprecation" )
42
43
43
44
final def children : immutable.Iterable [ActorRef ] = childrenRefs.children
44
45
@ nowarn(" msg=deprecated" )
@@ -65,7 +66,8 @@ private[pekko] trait Children { this: ActorCell =>
65
66
66
67
@ nowarn @ volatile private var _functionRefsDoNotCallMeDirectly = Map .empty[String , FunctionRef ]
67
68
private def functionRefs : Map [String , FunctionRef ] =
68
- Unsafe .instance.getObjectVolatile(this , AbstractActorCell .functionRefsOffset).asInstanceOf [Map [String , FunctionRef ]]
69
+ Unsafe .instance.getObjectVolatile(this , AbstractActorCell .functionRefsOffset).asInstanceOf [Map [String ,
70
+ FunctionRef ]]: @ nowarn(" cat=deprecation" )
69
71
70
72
private [pekko] def getFunctionRefOrNobody (name : String , uid : Int = ActorCell .undefinedUid): InternalActorRef =
71
73
functionRefs.getOrElse(name, Children .GetNobody ()) match {
@@ -84,7 +86,8 @@ private[pekko] trait Children { this: ActorCell =>
84
86
@ tailrec def rec (): Unit = {
85
87
val old = functionRefs
86
88
val added = old.updated(childPath.name, ref)
87
- if (! Unsafe .instance.compareAndSwapObject(this , AbstractActorCell .functionRefsOffset, old, added)) rec()
89
+ if (! Unsafe .instance.compareAndSwapObject(this , AbstractActorCell .functionRefsOffset, old, added): @ nowarn(
90
+ " cat=deprecation" )) rec()
88
91
}
89
92
rec()
90
93
@@ -99,7 +102,8 @@ private[pekko] trait Children { this: ActorCell =>
99
102
if (! old.contains(name)) false
100
103
else {
101
104
val removed = old - name
102
- if (! Unsafe .instance.compareAndSwapObject(this , AbstractActorCell .functionRefsOffset, old, removed)) rec()
105
+ if (! Unsafe .instance.compareAndSwapObject(this , AbstractActorCell .functionRefsOffset, old, removed): @ nowarn(
106
+ " cat=deprecation" )) rec()
103
107
else {
104
108
ref.stop()
105
109
true
@@ -112,17 +116,17 @@ private[pekko] trait Children { this: ActorCell =>
112
116
protected def stopFunctionRefs (): Unit = {
113
117
val refs = Unsafe .instance
114
118
.getAndSetObject(this , AbstractActorCell .functionRefsOffset, Map .empty)
115
- .asInstanceOf [Map [String , FunctionRef ]]
119
+ .asInstanceOf [Map [String , FunctionRef ]]: @ nowarn( " cat=deprecation " )
116
120
refs.valuesIterator.foreach(_.stop())
117
121
}
118
122
119
123
@ nowarn @ volatile private var _nextNameDoNotCallMeDirectly = 0L
120
124
final protected def randomName (sb : java.lang.StringBuilder ): String = {
121
- val num = Unsafe .instance.getAndAddLong(this , AbstractActorCell .nextNameOffset, 1 )
125
+ val num = Unsafe .instance.getAndAddLong(this , AbstractActorCell .nextNameOffset, 1 ): @ nowarn( " cat=deprecation " )
122
126
Helpers .base64(num, sb)
123
127
}
124
128
final protected def randomName (): String = {
125
- val num = Unsafe .instance.getAndAddLong(this , AbstractActorCell .nextNameOffset, 1 )
129
+ val num = Unsafe .instance.getAndAddLong(this , AbstractActorCell .nextNameOffset, 1 ): @ nowarn( " cat=deprecation " )
126
130
Helpers .base64(num)
127
131
}
128
132
@@ -151,7 +155,8 @@ private[pekko] trait Children { this: ActorCell =>
151
155
* low level CAS helpers
152
156
*/
153
157
private final def swapChildrenRefs (oldChildren : ChildrenContainer , newChildren : ChildrenContainer ): Boolean =
154
- Unsafe .instance.compareAndSwapObject(this , AbstractActorCell .childrenOffset, oldChildren, newChildren)
158
+ Unsafe .instance.compareAndSwapObject(this , AbstractActorCell .childrenOffset, oldChildren, newChildren): @ nowarn(
159
+ " cat=deprecation" )
155
160
156
161
@ tailrec final def reserveChild (name : String ): Boolean = {
157
162
val c = childrenRefs
@@ -184,7 +189,8 @@ private[pekko] trait Children { this: ActorCell =>
184
189
}
185
190
186
191
final protected def setTerminated (): Unit =
187
- Unsafe .instance.putObjectVolatile(this , AbstractActorCell .childrenOffset, TerminatedChildrenContainer )
192
+ Unsafe .instance.putObjectVolatile(this , AbstractActorCell .childrenOffset, TerminatedChildrenContainer ): @ nowarn(
193
+ " cat=deprecation" )
188
194
189
195
/*
190
196
* ActorCell-internal API
0 commit comments