Class KeyValueStateSupport
- java.lang.Object
-
- org.sourceid.saml20.adapter.state.KeyValueStateSupport
-
public final class KeyValueStateSupport extends Object
Provides functionality similar to using a HashMap to store key value pairs. Values can be added, removed and retrieved based off a globally unique key.
The advantage of using this implementation rather than a standard HashMap object is that it uses the PingFederate server's underlying implementation of inter-request state management to replicate or share the data in a clustered environment.
Note that this state support mechanism can only be used with the adaptive clustering state management model, or with directed clustering using the "state servers" or "sharing all nodes" models. It is not compatible with the "subclusters" model for directed clustering.- Since:
- 9.2
-
-
Constructor Summary
Constructors Constructor Description KeyValueStateSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetValue(String key)Retrieves a value based on a globally unique keyObjectremoveValue(String key)Retrieves and removes a value based on a globally unique keyvoidsetValue(String key, Object value)Stores globally unique key value pair.
-
-
-
Method Detail
-
setValue
public void setValue(String key, Object value)
Stores globally unique key value pair.NOTE: The value is going to be replaced if a key is reused.
- Parameters:
key- the key of the attribute, must be globally uniquevalue- the attribute value- Since:
- 9.2
-
getValue
public Object getValue(String key)
Retrieves a value based on a globally unique key- Parameters:
key- the key of the attribute, must be globally unique- Returns:
- the stored value
- Since:
- 9.2
-
-