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 Details

    • KeyValueStateSupport

      public KeyValueStateSupport()
  • Method Details

    • 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 unique
      value - 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
    • removeValue

      public Object removeValue(String key)
      Retrieves and removes a value based on a globally unique key
      Parameters:
      key - the key of the attribute, must be globally unique
      Returns:
      the removed value
      Since:
      9.2