protected class BasicContainerConfig.BasicTransaction extends Object implements ContainerConfig.Transaction
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
clear |
protected Set<String> |
removeContainers |
protected Map<String,Map<String,Object>> |
setContainers |
protected ContainerConfigException |
throwException |
| Modifier | Constructor and Description |
|---|---|
protected |
BasicContainerConfig.BasicTransaction() |
| Modifier and Type | Method and Description |
|---|---|
ContainerConfig.Transaction |
addContainer(Map<String,Object> container)
Adds or modifies a container configuration.
|
protected void |
changeContainersInConfig(BasicContainerConfig newConfig,
Map<String,Map<String,Object>> setContainers,
Set<String> removeContainers)
Applies the requested changes in a container configuration.
|
ContainerConfig.Transaction |
clearContainers()
Clears the container configuration before performing the other operations
in the transaction.
|
void |
commit()
Performs all the transaction operations on the container configuration.
|
protected Map<String,Map<String,Object>> |
deepCopyConfig(Map<String,Map<String,Object>> config)
Returns a deep copy of a configuration object.
|
protected BasicContainerConfig |
getTemporaryConfig(boolean copyValues)
Creates a temporary ContainerConfig object that optionally contains a
copy of the current configuration.
|
protected Map<String,Object> |
mergeParents(String name,
Map<String,Map<String,Object>> config)
Recursively merge values from parent containers in the prototype chain.
|
ContainerConfig.Transaction |
removeContainer(String name)
Removes a container configuration.
|
protected void |
setNewConfig(BasicContainerConfig newConfig)
Replaces the old configuration with the new configuration.
|
protected boolean clear
protected ContainerConfigException throwException
protected BasicContainerConfig.BasicTransaction()
public ContainerConfig.Transaction clearContainers()
ContainerConfig.TransactionclearContainers in interface ContainerConfig.Transactionpublic ContainerConfig.Transaction addContainer(Map<String,Object> container)
ContainerConfig.TransactionaddContainer in interface ContainerConfig.Transactioncontainer - The container's new configuration, as a map from
property name to property contents.public ContainerConfig.Transaction removeContainer(String name)
ContainerConfig.TransactionremoveContainer in interface ContainerConfig.Transactionname - The name of the container to remove.public void commit()
throws ContainerConfigException
ContainerConfig.Transactioncommit in interface ContainerConfig.TransactionContainerConfigException - If there was a problem applying the new
configuration. If this exception is thrown, the existing
configuration will not be modified.protected BasicContainerConfig getTemporaryConfig(boolean copyValues)
BasicContainerConfig and you change its
internals, you must generally override this method to generate an object
of the same type as your subclass, and to fill its contents correctly.copyValues - Whether the current configuration should be copied.protected void changeContainersInConfig(BasicContainerConfig newConfig, Map<String,Map<String,Object>> setContainers, Set<String> removeContainers) throws ContainerConfigException
newConfig - The container configuration object to modify.setContainers - A map from container name to container to
add/modify.removeContainers - A set of names of containers to remove.ContainerConfigException - If there was a problem setting the new
configuration.protected void setNewConfig(BasicContainerConfig newConfig)
newConfig - The map that contains the new configuration.protected Map<String,Object> mergeParents(String name, Map<String,Map<String,Object>> config) throws ContainerConfigException
ContainerConfigException - If there is an invalid parent parameter
in the prototype chain.Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.