org.sonatype.aether
Interface SessionData

All Known Implementing Classes:
DefaultSessionData

public interface SessionData

A container for data that is specific to a repository system session. Both components within the repository system and clients of the system may use this storage to associate arbitrary data with a session. Unlike a cache, this session data is not subject to purging. For this same reason, session data should also not be abused as a cache (i.e. for storing values that can be re-calculated) to avoid memory exhaustion. Note: Actual implementations must be thread-safe.

Author:
Benjamin Bentmann
See Also:
RepositorySystemSession.getData()

Method Summary
 java.lang.Object get(java.lang.Object key)
          Gets the session data associated with the specified key.
 void set(java.lang.Object key, java.lang.Object value)
          Associates the specified session data with the given key.
 

Method Detail

set

void set(java.lang.Object key,
         java.lang.Object value)
Associates the specified session data with the given key.

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.

get

java.lang.Object get(java.lang.Object key)
Gets the session data associated with the specified key.

Parameters:
key - The key for which to retrieve the session data, must not be null.
Returns:
The session date associated with the key or null if none.


Copyright © 2010 Sonatype, Inc.. All Rights Reserved.