Package org.eclipse.aether
Class DefaultSessionData
java.lang.Object
org.eclipse.aether.DefaultSessionData
- All Implemented Interfaces:
- SessionData
A simple session data storage backed by a thread-safe map.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncomputeIfAbsent(Object key, Supplier<Object> supplier) Retrieve of compute the data associated with the specified key.Gets the session data associated with the specified key.voidAssociates the specified session data with the given key.booleanAssociates the specified session data with the given key if the key is currently mapped to the given value.
- 
Constructor Details- 
DefaultSessionDatapublic DefaultSessionData()
 
- 
- 
Method Details- 
setDescription copied from interface:SessionDataAssociates the specified session data with the given key.- Specified by:
- setin interface- SessionData
- Parameters:
- key- The key under which to store the session data, must not be- null.
- value- The data to associate with the key, may be- nullto remove the mapping.
 
- 
setDescription copied from interface:SessionDataAssociates the specified session data with the given key if the key is currently mapped to the given value. This method provides an atomic compare-and-update of some key's value.- Specified by:
- setin interface- SessionData
- Parameters:
- key- The key under which to store the session data, must not be- null.
- oldValue- The expected data currently associated with the key, may be- null.
- newValue- The data to associate with the key, may be- nullto remove the mapping.
- Returns:
- trueif the key mapping was successfully updated from the old value to the new value,- falseif the current key mapping didn't match the expected value and was not updated.
 
- 
getDescription copied from interface:SessionDataGets the session data associated with the specified key.- Specified by:
- getin interface- SessionData
- Parameters:
- key- The key for which to retrieve the session data, must not be- null.
- Returns:
- The session data associated with the key or nullif none.
 
- 
computeIfAbsentDescription copied from interface:SessionDataRetrieve of compute the data associated with the specified key.- Specified by:
- computeIfAbsentin interface- SessionData
- Parameters:
- key- The key for which to retrieve the session data, must not be- null.
- supplier- The supplier will compute the new value.
- Returns:
- The session data associated with the key.
 
 
-