Interface SharedData
-
public interface SharedData
Provides a mechanism to obtain shared data structures.- Since:
- 5.7
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <K extends Serializable,V extends Serializable>
@NonNull Map<K,V>getMap()
Obtains a Map view of the shared data.default <K extends Serializable,V extends Serializable>
org.apache.commons.lang3.mutable.Mutable<V>getMutable(K key, V defaultValue)
-
-
-
Method Detail
-
getMap
<K extends Serializable,V extends Serializable> @NonNull Map<K,V> getMap()
Obtains a Map view of the shared data. The returned Map is guaranteed thread-safe.
-
getMutable
default <K extends Serializable,V extends Serializable> org.apache.commons.lang3.mutable.Mutable<V> getMutable(K key, V defaultValue)
- Parameters:
key
- key of the shared datadefaultValue
- default value when the shared data is absent- Returns:
- a mutable reference to the shared data at a given key.
- Since:
- 7.14
-
-