*
* @param params the detyped operation parameters
* @return the hornetQ configuration
*/
static Configuration transformConfig(final ModelNode params) {
final Configuration configuration = new ConfigurationImpl();
// --
configuration.setBackup(params.get(BACKUP).asBoolean(ConfigurationImpl.DEFAULT_BACKUP));
if(params.has(BACKUP_CONNECTOR_REF)) {
configuration.setBackupConnectorName(params.get(BACKUP_CONNECTOR_REF).asString());
}
configuration.setClustered(params.get(CLUSTERED).asBoolean(ConfigurationImpl.DEFAULT_CLUSTERED));
configuration.setClusterPassword(params.get(CLUSTER_PASSWORD).asString());
configuration.setClusterUser(params.get(CLUSTER_USER).asString());
configuration.setConnectionTTLOverride(params.get(CONNECTION_TTL_OVERRIDE).asInt((int) ConfigurationImpl.DEFAULT_CONNECTION_TTL_OVERRIDE));
configuration.setCreateBindingsDir(params.get(CREATE_BINDINGS_DIR).asBoolean(ConfigurationImpl.DEFAULT_CREATE_BINDINGS_DIR));
configuration.setCreateJournalDir(params.get(CREATE_JOURNAL_DIR).asBoolean(ConfigurationImpl.DEFAULT_CREATE_JOURNAL_DIR));
configuration.setEnabledAsyncConnectionExecution(params.get(ASYNC_CONNECTION_EXECUTION_ENABLED).asBoolean(ConfigurationImpl.DEFAULT_ASYNC_CONNECTION_EXECUTION_ENABLED));
configuration.setIDCacheSize(params.get(ID_CACHE_SIZE).asInt(ConfigurationImpl.DEFAULT_ID_CACHE_SIZE));
// TODO do we want to allow the jmx configuration ?
if(params.hasDefined(JMX_DOMAIN)) configuration.setJMXDomain(params.get(JMX_DOMAIN).asString());
configuration.setJMXManagementEnabled(params.get(JMX_MANAGEMENT_ENABLED).asBoolean(ConfigurationImpl.DEFAULT_JMX_MANAGEMENT_ENABLED));
// Journal
final JournalType journalType = params.hasDefined(JOURNAL_TYPE) ? JournalType.valueOf(params.get(JOURNAL_TYPE).asString()) : ConfigurationImpl.DEFAULT_JOURNAL_TYPE;
configuration.setJournalType(journalType);
// AIO Journal
configuration.setJournalBufferSize_AIO(params.get(JOURNAL_BUFFER_SIZE).asInt(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_AIO));
configuration.setJournalBufferTimeout_AIO(params.get(JOURNAL_BUFFER_TIMEOUT).asInt(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO));
configuration.setJournalMaxIO_AIO(params.get(JOURNAL_MAX_IO).asInt(ConfigurationImpl.DEFAULT_JOURNAL_MAX_IO_AIO));
// NIO Journal
configuration.setJournalBufferSize_NIO(params.get(JOURNAL_BUFFER_SIZE).asInt(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_SIZE_NIO));
configuration.setJournalBufferTimeout_NIO(params.get(JOURNAL_BUFFER_TIMEOUT).asInt(ConfigurationImpl.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO));
configuration.setJournalMaxIO_NIO(params.get(JOURNAL_MAX_IO).asInt(ConfigurationImpl.DEFAULT_JOURNAL_MAX_IO_NIO));
//
configuration.setJournalCompactMinFiles(params.get(JOURNAL_COMPACT_MIN_FILES).asInt(ConfigurationImpl.DEFAULT_JOURNAL_MIN_FILES));
configuration.setJournalCompactPercentage(params.get(JOURNAL_COMPACT_PERCENTAGE).asInt(ConfigurationImpl.DEFAULT_JOURNAL_COMPACT_PERCENTAGE));
configuration.setJournalFileSize(params.get(JOURNAL_FILE_SIZE).asInt(ConfigurationImpl.DEFAULT_JOURNAL_FILE_SIZE));
configuration.setJournalMinFiles(params.get(JOURNAL_MIN_FILES).asInt(ConfigurationImpl.DEFAULT_JOURNAL_MIN_FILES));
configuration.setJournalPerfBlastPages(params.get(PERF_BLAST_PAGES).asInt(ConfigurationImpl.DEFAULT_JOURNAL_PERF_BLAST_PAGES));
configuration.setJournalSyncNonTransactional(params.get(JOURNAL_SYNC_NON_TRANSACTIONAL).asBoolean(ConfigurationImpl.DEFAULT_JOURNAL_SYNC_NON_TRANSACTIONAL));
configuration.setJournalSyncTransactional(params.get(JOURNAL_SYNC_TRANSACTIONAL).asBoolean(ConfigurationImpl.DEFAULT_JOURNAL_SYNC_TRANSACTIONAL));
configuration.setLogJournalWriteRate(params.get(LOG_JOURNAL_WRITE_RATE).asBoolean(ConfigurationImpl.DEFAULT_JOURNAL_LOG_WRITE_RATE));
// configuration.setManagementAddress(address)
// configuration.setManagementNotificationAddress(address)
// TODO more
configuration.setPersistDeliveryCountBeforeDelivery(params.get(PERSIST_DELIVERY_COUNT_BEFORE_DELIVERY).asBoolean(ConfigurationImpl.DEFAULT_PERSIST_DELIVERY_COUNT_BEFORE_DELIVERY));
configuration.setPersistenceEnabled(params.get(PERSISTENCE_ENABLED).asBoolean(ConfigurationImpl.DEFAULT_PERSISTENCE_ENABLED));
configuration.setPersistIDCache(params.get(PERSIST_ID_CACHE).asBoolean(ConfigurationImpl.DEFAULT_PERSIST_ID_CACHE));
// --
processAddressSettings(configuration, params);
processCoreQueues(configuration, params);
processSecuritySettings(configuration, params);