Package org.opensaml.core.config.provider

# Class MapBasedConfiguration

java.lang.Object
org.opensaml.core.config.provider.MapBasedConfiguration

All Implemented Interfaces:
  `Configuration`

public class MapBasedConfiguration extends Object implements Configuration
A configuration implementation which stores registered configuration instances in a local instance of `ConcurrentHashMap`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final Map<String,Map<String,Object>>`
`storage`
Storage for registered configuration objects.

## Constructor Summary

Constructors
Constructor
Description
`MapBasedConfiguration()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`<T> T`
`deregister(Class<T> configClass, String partitionName)`
Deregister a configuration instance.
`<T> T`
`get(Class<T> configClass, String partitionName)`
Obtain the registered configuration instance.
`private Map<String,Object>`
`getPartition(String partitionName)`
Get the Map instance which corresponds to the specified partition name.
`<T, I extends T>
void`
`register(Class<T> configClass, I configuration, String partitionName)`
Register a configuration instance.

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

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

## Field Details

### storage

@Nonnull private final Map<String,Map<String,Object>> storage
Storage for registered configuration objects.

## Constructor Details

### MapBasedConfiguration

public MapBasedConfiguration()
Constructor.

## Method Details

### get

@Nullable public <T> T get(@Nonnull Class<T> configClass, @Nonnull String partitionName)
Obtain the registered configuration instance.

Specified by:
  `get` in interface `Configuration`
Type Parameters:
  `T` - the type of configuration being retrieved, typically an interface
Parameters:
  `configClass` - the configuration class identifier, typically an interface
  `partitionName` - the partition name to use
Returns:
  the instance of the registered configuration interface, or null

### register

public <T, I extends T> void register(@Nonnull Class<T> configClass, @Nonnull I configuration, @Nonnull String partitionName)
Register a configuration instance.

Specified by:
  `register` in interface `Configuration`
Type Parameters:
  `T` - the type of configuration being registered, typically an interface
  `I` - the configuration implementation being registered, which will be an instance of `T`
Parameters:
  `configClass` - the type of configuration class being registered, typically an interface
  `configuration` - the configuration implementation instance being registered
  `partitionName` - the partition name to use

### deregister

@Nullable public <T> T deregister(@Nonnull Class<T> configClass, @Nonnull String partitionName)
Deregister a configuration instance.

Specified by:
  `deregister` in interface `Configuration`
Type Parameters:
  `T` - the type of configuration being deregistered, typically an interface
Parameters:
  `configClass` - the type of configuration class being deregistered , typically an interface
  `partitionName` - the partition name to use
Returns:
  the configuration implementation instance which was deregistered, or null

### getPartition

@Nonnull private Map<String,Object> getPartition(@Nonnull String partitionName)
Get the Map instance which corresponds to the specified partition name.

Parameters:
  `partitionName` - the partition name to use
Returns:
  the Map corresponding to the partition name. A new empty Map will be created if necessary