Package com.gigaspaces.internal.utils
Class Singletons
java.lang.Object
com.gigaspaces.internal.utils.Singletons
- Since:
- 10.0
- Author:
- Niv Ingberg
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectcompareAndRemove(String name, Object value) The usage of this method is to ensure that a remove followed by putIfAbsent is safe from race conditions between the two calls.static Objectstatic ObjectputIfAbsent(String name, Object newValue) static void
-
Method Details
-
get
-
putIfAbsent
-
remove
-
compareAndRemove
The usage of this method is to ensure that a remove followed by putIfAbsent is safe from race conditions between the two calls. Acts like compare AND set, but with removal. Will remove the key if the value matches the existing value in the map.- Returns:
- the existing value mapped to this key before removal
-