public class AttributesManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AttributesManager.Builder |
Modifier and Type | Method and Description |
---|---|
static AttributesManager.Builder |
builder() |
void |
deletePersistentAttributes()
Deletes the persistent attributes from the persistence layer.
|
Map<String,Object> |
getPersistentAttributes()
Retrieves current persistence attributes.
|
Map<String,Object> |
getRequestAttributes()
Retrieves current request attributes.
|
Map<String,Object> |
getSessionAttributes()
Retrieves current session attributes.
|
void |
savePersistentAttributes()
Saves the current persistent attribute state back to the persistence layer.
|
void |
setPersistentAttributes(Map<String,Object> persistentAttributes)
Sets persistent attributes.
|
void |
setRequestAttributes(Map<String,Object> requestAttributes)
Sets request attributes.
|
void |
setSessionAttributes(Map<String,Object> sessionAttributes)
Sets session attributes, replacing any existing attributes already present in the session.
|
public static AttributesManager.Builder builder()
public Map<String,Object> getSessionAttributes()
IllegalStateException
- if attempting to retrieve session attributes from an out of session requestpublic void setSessionAttributes(Map<String,Object> sessionAttributes)
sessionAttributes
- session attributes to setIllegalStateException
- if attempting to retrieve session attributes from an out of session requestpublic Map<String,Object> getPersistentAttributes()
savePersistentAttributes()
is called. An exception is thrown if this method is called
when a PersistenceAdapter
is not configured on the SDK.IllegalStateException
- if no PersistenceAdapter
is configuredpublic void setPersistentAttributes(Map<String,Object> persistentAttributes)
savePersistentAttributes()
is called. Use this method
when bulk replacing attributes is desired. An exception is thrown if this method is called when a
PersistenceAdapter
is not configured on the SDK.persistentAttributes
- persistent attributes to setIllegalStateException
- if no PersistenceAdapter
is configuredpublic Map<String,Object> getRequestAttributes()
public void setRequestAttributes(Map<String,Object> requestAttributes)
requestAttributes
- request attributes to setpublic void savePersistentAttributes()
PersistenceAdapter
is not configured on the SDK.IllegalStateException
- if no PersistenceAdapter
is configuredpublic void deletePersistentAttributes()
PersistenceAdapter
is not configured on the SDK.IllegalStateException
- if no PersistenceAdapter
is configuredCopyright © Amazon.com, Inc. or its affiliates. All Rights Reserved.