You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/07/12 20:06:41 UTC
[GitHub] [ignite] AMashenkov commented on a change in pull request #9246: Ignite 12749 Fixed unsupported operation exception on node stop if collisionspi not null
AMashenkov commented on a change in pull request #9246:
URL: https://github.com/apache/ignite/pull/9246#discussion_r667934747
##########
File path: modules/core/src/main/java/org/jsr166/ConcurrentLinkedHashMap.java
##########
@@ -1536,10 +1553,60 @@ public V replacex(K key, V oldVal, V newVal) {
}
/**
- * Removes all of the mappings from this map.
+ * Removes all of the mappings from this map. Performs recursive table locking.
*/
@Override public void clear() {
- throw new UnsupportedOperationException();
+ int len = segments.length;
+
+ clear(0, len);
+ }
+
+ /**
+ * Recursively locks each segment in consistent order. When all segments are locked method clears them
+ * all and releases locks in reverse order.
+ * @param segIndex segIndex of a segment to lock
+ * @param len length of segments array
+ */
+ private void clear(int segIndex, int len) {
+
Review comment:
```suggestion
private void clear(int segIndex, int len) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org