org.eclipse.aether

## Class DefaultSessionData

- java.lang.Object
- - org.eclipse.aether.DefaultSessionData

- All Implemented Interfaces:
    SessionData

      public final class DefaultSessionData
      extends Object
      implements SessionData

  A simple session data storage backed by a thread-safe map.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultSessionData()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `get(Object key)` Gets the session data associated with the specified key.
    `void` | `set(Object key, Object value)` Associates the specified session data with the given key.
    `boolean` | `set(Object key, Object oldValue, Object newValue)` Associates the specified session data with the given key if the key is currently mapped to the given value.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultSessionData

          public DefaultSessionData()

  - ### Method Detail

    - #### set

          public void set(Object key,
                 Object value)

      Description copied from interface: `SessionData`
      Associates the specified session data with the given key.
      Specified by:
        `set` in 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 `null` to remove the mapping.

    - #### set

          public boolean set(Object key,
                    Object oldValue,
                    Object newValue)

      Description copied from interface: `SessionData`
      Associates 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:
        `set` in 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 `null` to remove the mapping.
      Returns:
        `true` if the key mapping was updated to the specified value, `false` if the current key mapping didn't match the expected value and was not updated.

    - #### get

          public Object get(Object key)

      Description copied from interface: `SessionData`
      Gets the session data associated with the specified key.
      Specified by:
        `get` in 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 `null` if none.

Copyright © 2010-2013 The Eclipse Foundation. All Rights Reserved.