Methods Summary |
---|
private void | checkConfigExists(java.lang.String configName)
final Map<String,ConfigConfig> configs = getDomainConfig().getConfigConfigMap();
if( ! configs.keySet().contains( configName ) )
{
throw new IllegalArgumentException( "No ConfigConfig exists with the name: " + configName );
}
|
private boolean | clusterExists(java.lang.String name)
return getDomainConfig().getClusterConfigMap().keySet().contains( name );
|
public javax.management.ObjectName | create(java.lang.String name, java.lang.String configName, java.util.Map optional)
if ( configName != null )
{
checkNonEmptyString( configName, "configName" );
checkConfigExists( configName );
// This is explicitly disallowed
if ( configName.equals( "server-config" ) || configName.equals( "default-config" ) )
{
throw new IllegalArgumentException( configName );
}
}
if ( clusterExists( name ) )
{
throw new IllegalArgumentException( "Cluster already exists: " + quote( name ) );
}
final String[] requiredParams =
{
"ReferencedConfigName", configName,
};
final Map<String,String> params = initParams( name, requiredParams, optional );
return createNamedChild( name, params );
|
public javax.management.ObjectName | create(java.lang.String name, java.util.Map optional)
return create( name, null, optional );
|
protected javax.management.ObjectName | createOldChildConfig(javax.management.AttributeList translatedAttrs, java.util.Properties props)
// YUCK--createCluster( AttributeList ) cannot be called;
// it won't work correctly; we must make the call explicity.
final Map<String,String> m = JMXUtil.attributeListToStringMap( translatedAttrs );
final String config = (String)m.get( "config-ref" );
final String name = (String)m.get( "name" );
return mOldClustersMBean.createCluster( name, config, props );
|
protected java.util.Map | getParamNameOverrides()
return( MapUtil.newMap( REFERENCED_CONFIG_NAME, "config-ref" ) );
|
protected void | internalRemove(javax.management.ObjectName objectName)
final String name = Util.getName(objectName);
if ( ! clusterExists( name ) )
{
throw new IllegalArgumentException( "No such cluster: " + quote( name ) );
}
mOldClustersMBean.deleteCluster(name);
|