|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.geronimo.farm.deployment.MasterConfigurationStore
public class MasterConfigurationStore
Field Summary | |
---|---|
static String |
GBEAN_ATTR_DEFAULT_ENV
|
static String |
GBEAN_ATTR_KERNEL
|
static String |
GBEAN_ATTR_OBJECT_NAME
|
static GBeanInfo |
GBEAN_INFO
|
static String |
GBEAN_J2EE_TYPE
|
static String |
GBEAN_REF_CLUSTER_CONF_STORE_CLIENT
|
static String |
GBEAN_REF_CLUSTER_INFO
|
static String |
GBEAN_REF_REPOSITORY
|
Constructor Summary | |
---|---|
MasterConfigurationStore(Kernel kernel,
String objectName,
AbstractName abstractName,
WritableListableRepository repository,
Environment defaultEnvironment,
ClusterInfo clusterInfo,
ClusterConfigurationStoreClient storeDelegate)
|
Method Summary | |
---|---|
protected GBeanData |
buildControllerGBean(Artifact configId,
NodeInfo nodeInfo,
Artifact slaveConfigId)
|
protected List<GBeanData> |
buildControllerGBeans(Artifact configId,
Artifact slaveConfigId)
|
protected AbstractName |
buildControllerName(Artifact configId,
NodeInfo nodeInfo)
|
protected Environment |
buildEnvironment(ConfigurationData configurationData)
|
protected ConfigurationData |
buildMasterConfigurationData(ConfigurationData configurationData,
Artifact slaveConfigId)
|
boolean |
containsConfiguration(Artifact configId)
Determines if the store contains a configuration with the specified ID. |
File |
createNewConfigurationDir(Artifact configId)
Creates an empty directory for a new configuration with the specified configId |
protected void |
ensureArtifactForMasterConfiguration(Artifact configId)
|
void |
exportConfiguration(Artifact configId,
OutputStream output)
Exports a configuration as a ZIP file. |
AbstractName |
getAbstractName()
Return the object name for the store. |
static GBeanInfo |
getGBeanInfo()
|
String |
getObjectName()
Return the object name for the store. |
void |
install(ConfigurationData configurationData)
Move the unpacked configuration directory into this store |
protected void |
installMasterConfiguration(ConfigurationData configurationData,
Artifact slaveConfigId)
|
protected void |
installSlaveConfiguration(ConfigurationData configurationData)
|
boolean |
isInPlaceConfiguration(Artifact configId)
Determines if the identified configuration is an in-place one. |
List<ConfigurationInfo> |
listConfigurations()
Return the configurations in the store |
ConfigurationData |
loadConfiguration(Artifact configId)
Loads the specified configuration into the kernel |
protected ConfigurationStore |
newConfigurationStore(Kernel kernel,
String objectName,
AbstractName abstractName,
WritableListableRepository repository)
|
protected SlaveConfigurationNameBuilder |
newSlaveConfigurationNameBuilder()
|
Set<URL> |
resolve(Artifact configId,
String moduleName,
String path)
Locate the physical locations which match the supplied path in the given artifact/module. |
void |
uninstall(Artifact configId)
Removes a configuration from the store |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final GBeanInfo GBEAN_INFO
public static final String GBEAN_J2EE_TYPE
public static final String GBEAN_ATTR_KERNEL
public static final String GBEAN_ATTR_OBJECT_NAME
public static final String GBEAN_ATTR_DEFAULT_ENV
public static final String GBEAN_REF_REPOSITORY
public static final String GBEAN_REF_CLUSTER_INFO
public static final String GBEAN_REF_CLUSTER_CONF_STORE_CLIENT
Constructor Detail |
---|
public MasterConfigurationStore(Kernel kernel, String objectName, AbstractName abstractName, WritableListableRepository repository, Environment defaultEnvironment, ClusterInfo clusterInfo, ClusterConfigurationStoreClient storeDelegate)
Method Detail |
---|
public boolean containsConfiguration(Artifact configId)
ConfigurationStore
containsConfiguration
in interface ConfigurationStore
configId
- the unique ID of the configuration, which must be fully
resolved (isResolved() == true)
public File createNewConfigurationDir(Artifact configId) throws ConfigurationAlreadyExistsException
ConfigurationStore
createNewConfigurationDir
in interface ConfigurationStore
configId
- the unique ID of the configuration, which must be fully
resolved (isResolved() == true)
ConfigurationAlreadyExistsException
- if the configuration already exists in this storepublic void exportConfiguration(Artifact configId, OutputStream output) throws IOException, NoSuchConfigException
ConfigurationStore
exportConfiguration
in interface ConfigurationStore
configId
- The unique ID of the configuration to export, which
must be fully resolved (isResolved() == true)output
- The stream to write the ZIP content to
IOException
NoSuchConfigException
public AbstractName getAbstractName()
ConfigurationStore
getAbstractName
in interface ConfigurationStore
public String getObjectName()
ConfigurationStore
getObjectName
in interface ConfigurationStore
public void install(ConfigurationData configurationData) throws IOException, InvalidConfigException
ConfigurationStore
install
in interface ConfigurationStore
configurationData
- the configuration data
IOException
- if the direcotyr could not be moved into the store
InvalidConfigException
- if there is a configuration problem within the source direcotrypublic boolean isInPlaceConfiguration(Artifact configId) throws NoSuchConfigException, IOException
ConfigurationStore
isInPlaceConfiguration
in interface ConfigurationStore
configId
- the unique ID of the configuration, which must be fully
resolved (isResolved() == true)
NoSuchConfigException
- if the configuration is not contained in
the store
IOException
- If the store cannot be read.public List<ConfigurationInfo> listConfigurations()
ConfigurationStore
listConfigurations
in interface ConfigurationStore
public ConfigurationData loadConfiguration(Artifact configId) throws NoSuchConfigException, IOException, InvalidConfigException
ConfigurationStore
loadConfiguration
in interface ConfigurationStore
configId
- the id of the configuration to load, which must be fully
resolved (isResolved() == true)
NoSuchConfigException
- if the configuration is not contained in the kernel
IOException
- if a problem occurs loading the configuration from the store
InvalidConfigException
- if the configuration is corruptpublic Set<URL> resolve(Artifact configId, String moduleName, String path) throws NoSuchConfigException, MalformedURLException
ConfigurationStore
resolve
in interface ConfigurationStore
configId
- the artifact to search, which must be fully resolved
(isResolved() == true)moduleName
- the module name or null to search in the top-level
artifact locationpath
- the pattern to search for within the artifact/module,
which may also be null to identify the artifact or
module base path
NoSuchConfigException
MalformedURLException
public void uninstall(Artifact configId) throws NoSuchConfigException, IOException
ConfigurationStore
uninstall
in interface ConfigurationStore
configId
- the id of the configuration to remove, which must be
fully resolved (isResolved() == true)
NoSuchConfigException
- if the configuration is not contained in the store
IOException
- if a problem occurs during the removalprotected void ensureArtifactForMasterConfiguration(Artifact configId) throws NoSuchConfigException
NoSuchConfigException
protected ConfigurationStore newConfigurationStore(Kernel kernel, String objectName, AbstractName abstractName, WritableListableRepository repository)
protected SlaveConfigurationNameBuilder newSlaveConfigurationNameBuilder()
protected void installMasterConfiguration(ConfigurationData configurationData, Artifact slaveConfigId) throws IOException, InvalidConfigException
IOException
InvalidConfigException
protected void installSlaveConfiguration(ConfigurationData configurationData) throws IOException, InvalidConfigException
IOException
InvalidConfigException
protected ConfigurationData buildMasterConfigurationData(ConfigurationData configurationData, Artifact slaveConfigId)
protected Environment buildEnvironment(ConfigurationData configurationData)
protected List<GBeanData> buildControllerGBeans(Artifact configId, Artifact slaveConfigId)
protected GBeanData buildControllerGBean(Artifact configId, NodeInfo nodeInfo, Artifact slaveConfigId)
protected AbstractName buildControllerName(Artifact configId, NodeInfo nodeInfo)
public static GBeanInfo getGBeanInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |