org.infinispan.config
Interface ConfigurationRegistry


public interface ConfigurationRegistry

A registry for Configurations.

Since:
4.0
Author:
Brian Stansberry

Method Summary
 Configuration getConfiguration(String configName)
          Gets a clone of the Configuration registered under the given name.
 Set<String> getConfigurationNames()
          Gets the names of all registered configurations.
 void registerConfiguration(String configName, Configuration config)
          Register the given configuration under the given name.
 void unregisterConfiguration(String configName)
          Unregisters the named configuration.
 

Method Detail

getConfiguration

Configuration getConfiguration(String configName)
                               throws Exception
Gets a clone of the Configuration registered under the given name.

The returned object is a clone of the internally held configuration, so any changes made to it by the caller will not affect the internal state of this registry.

Parameters:
configName - the name of the configuration
Returns:
a Configuration. Will not be null.
Throws:
IllegalArgumentException - if no configuration is registered under configName
Exception

registerConfiguration

void registerConfiguration(String configName,
                           Configuration config)
                           throws CloneNotSupportedException
Register the given configuration under the given name.

The configuration will be cloned before being stored internally, so the copy under the control of the registry will not be affected by any external changes.

Parameters:
configName - the name of the configuration
config - the configuration
Throws:
CloneNotSupportedException
IllegalStateException - if a configuration is already registered under configName

unregisterConfiguration

void unregisterConfiguration(String configName)
Unregisters the named configuration.

Parameters:
configName - the name of the configuration
Throws:
IllegalStateException - if no configuration is registered under configName

getConfigurationNames

Set<String> getConfigurationNames()
Gets the names of all registered configurations.

Returns:
a set of configuration names

-->

Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.