public HadoopConfiguration() { super(); super.setDelimiterParsingDisabled(true); }
public static void serialize(final Object object, final Configuration configuration, final String key) { if (configuration instanceof AbstractConfiguration) ((AbstractConfiguration) configuration).setDelimiterParsingDisabled(true); try { configuration.setProperty(key, Base64.getEncoder().encodeToString(Serializer.serializeObject(object))); } catch (final IOException e) { throw new IllegalArgumentException(e.getMessage(), e); } }
public HadoopConfiguration() { super(); super.setDelimiterParsingDisabled(true); }
/** * Sets a flag whether added values for string properties should be checked * for the list delimiter. This implementation ensures that the in memory * configuration is correctly initialized. * * @param delimiterParsingDisabled the new value of the flag * @since 1.4 */ @Override public void setDelimiterParsingDisabled(boolean delimiterParsingDisabled) { if (inMemoryConfiguration instanceof AbstractConfiguration) { ((AbstractConfiguration) inMemoryConfiguration) .setDelimiterParsingDisabled(delimiterParsingDisabled); } super.setDelimiterParsingDisabled(delimiterParsingDisabled); }
/** * Sets a flag whether added values for string properties should be checked * for the list delimiter. This implementation ensures that the in memory * configuration is correctly initialized. * * @param delimiterParsingDisabled the new value of the flag * @since 1.4 */ @Override public void setDelimiterParsingDisabled(boolean delimiterParsingDisabled) { if (inMemoryConfiguration instanceof AbstractConfiguration) { ((AbstractConfiguration) inMemoryConfiguration) .setDelimiterParsingDisabled(delimiterParsingDisabled); } super.setDelimiterParsingDisabled(delimiterParsingDisabled); }
/** * Sets a flag whether list parsing is disabled. This implementation will * also set the flag at the parent configuration if this object supports * this feature. * * @param delimiterParsingDisabled the delimiter parsing disabled flag * @since 1.4 */ @Override public void setDelimiterParsingDisabled(boolean delimiterParsingDisabled) { if (parent instanceof AbstractConfiguration) { ((AbstractConfiguration) parent) .setDelimiterParsingDisabled(delimiterParsingDisabled); } else { super.setDelimiterParsingDisabled(delimiterParsingDisabled); } }
/** * Sets a flag whether list parsing is disabled. This implementation will * also set the flag at the parent configuration if this object supports * this feature. * * @param delimiterParsingDisabled the delimiter parsing disabled flag * @since 1.4 */ @Override public void setDelimiterParsingDisabled(boolean delimiterParsingDisabled) { if (parent instanceof AbstractConfiguration) { ((AbstractConfiguration) parent) .setDelimiterParsingDisabled(delimiterParsingDisabled); } else { super.setDelimiterParsingDisabled(delimiterParsingDisabled); } }
/** * Create an instance with an empty map. */ public ConcurrentMapConfiguration() { map = new ConcurrentHashMap<String,Object>(); for (int i = 0; i < NUM_LOCKS; i++) { locks[i] = new ReentrantLock(); } String disableDelimiterParsing = System.getProperty(DISABLE_DELIMITER_PARSING, "false"); super.setDelimiterParsingDisabled(Boolean.valueOf(disableDelimiterParsing)); }
/** * Create an instance with an empty map. */ public ConcurrentMapConfiguration() { map = new ConcurrentHashMap<String,Object>(); for (int i = 0; i < NUM_LOCKS; i++) { locks[i] = new ReentrantLock(); } String disableDelimiterParsing = System.getProperty(DISABLE_DELIMITER_PARSING, "false"); super.setDelimiterParsingDisabled(Boolean.valueOf(disableDelimiterParsing)); }
/** * Sets attributes of the configuration to common values. Pass any Configuration objects * created by this helper to this method to ensure consistency. * * @param configuration the new configuration to set up * @return the same configuration that was passed, updated with common attribute values */ private <C extends AbstractConfiguration> C setupConfiguration(C configuration) { configuration.setListDelimiter(','); configuration.setDelimiterParsingDisabled(false); return configuration; }
public FluoConfiguration(Configuration configuration) { this(); if (configuration instanceof AbstractConfiguration) { AbstractConfiguration aconf = (AbstractConfiguration) configuration; aconf.setDelimiterParsingDisabled(true); } addConfiguration(configuration); }
/** * Sets a flag whether added values for string properties should be checked * for the list delimiter. This implementation ensures that the container * configuration is correctly initialized. * * @param delimiterParsingDisabled the new value of the flag */ @Override public void setDelimiterParsingDisabled(boolean delimiterParsingDisabled) { containerConfiguration.setDelimiterParsingDisabled(delimiterParsingDisabled); super.setDelimiterParsingDisabled(delimiterParsingDisabled); }
/** * Sets attributes of the configuration to common values. Pass any Configuration objects * created by this helper to this method to ensure consistency. * * @param configuration the new configuration to set up * @return the same configuration that was passed, updated with common attribute values */ private <C extends AbstractConfiguration> C setupConfiguration(C configuration) { configuration.setListDelimiter(','); configuration.setDelimiterParsingDisabled(false); return configuration; }
/** * Sets a flag whether added values for string properties should be checked * for the list delimiter. This implementation ensures that the container * configuration is correctly initialized. * * @param delimiterParsingDisabled the new value of the flag */ @Override public void setDelimiterParsingDisabled(boolean delimiterParsingDisabled) { containerConfiguration.setDelimiterParsingDisabled(delimiterParsingDisabled); super.setDelimiterParsingDisabled(delimiterParsingDisabled); }
public static void serialize(final Object object, final Configuration configuration, final String key) { if (configuration instanceof AbstractConfiguration) ((AbstractConfiguration) configuration).setDelimiterParsingDisabled(true); try { configuration.setProperty(key, Base64.getEncoder().encodeToString(Serializer.serializeObject(object))); } catch (final IOException e) { throw new IllegalArgumentException(e.getMessage(), e); } }
private org.apache.commons.configuration.Configuration createConfiguration() { AbstractConfiguration config; switch (this.type) { case XML: config = new XMLConfiguration(); break; case SYSTEM: config = new SystemConfiguration(); break; default: config = new PropertiesConfiguration(); } config.setDelimiterParsingDisabled(true); return config; }
c.setDelimiterParsingDisabled(true); for (Iterator<String> it = getKeys(); it.hasNext();) c.setDelimiterParsingDisabled(isDelimiterParsingDisabled()); return c;
protected void load(boolean refresh) { List<AbstractConfiguration> configs = extensionManager.getExtensionList(CONFIG_KEY, AbstractConfiguration.class); for (AbstractConfiguration config : configs) { config.setDelimiterParsingDisabled(true); } if (refresh) { for (AbstractConfiguration config : configs) { refresh(config); } } baseConfig.clear(); for (AbstractConfiguration config : configs) { baseConfig.addConfiguration(config); } if (refresh) { for (RefreshableFixedDelayPollingScheduler scheduler : schedulers) { scheduler.refresh(); } ArchaiusUtil.addSchedulers(schedulers); } }
/** * Removes all child configurations and reinitializes the <em>container * configuration</em>. <strong>Attention:</strong> A new container * configuration is created; the old one is lost. */ @Override public final void clear() { fireEvent(EVENT_CLEAR, null, null, true); configList.clear(); namedConfigurations.clear(); // recreate the in memory configuration containerConfiguration = new ConcurrentMapConfiguration(); containerConfiguration.setThrowExceptionOnMissing(isThrowExceptionOnMissing()); containerConfiguration.setListDelimiter(getListDelimiter()); containerConfiguration.setDelimiterParsingDisabled(isDelimiterParsingDisabled()); containerConfiguration.addConfigurationListener(eventPropagater); configList.add(containerConfiguration); overrideProperties = new ConcurrentMapConfiguration(); overrideProperties.setThrowExceptionOnMissing(isThrowExceptionOnMissing()); overrideProperties.setListDelimiter(getListDelimiter()); overrideProperties.setDelimiterParsingDisabled(isDelimiterParsingDisabled()); overrideProperties.addConfigurationListener(eventPropagater); fireEvent(EVENT_CLEAR, null, null, false); containerConfigurationChanged = false; invalidate(); }
/** * Removes all child configurations and reinitializes the <em>container * configuration</em>. <strong>Attention:</strong> A new container * configuration is created; the old one is lost. */ @Override public final void clear() { fireEvent(EVENT_CLEAR, null, null, true); configList.clear(); namedConfigurations.clear(); // recreate the in memory configuration containerConfiguration = new ConcurrentMapConfiguration(); containerConfiguration.setThrowExceptionOnMissing(isThrowExceptionOnMissing()); containerConfiguration.setListDelimiter(getListDelimiter()); containerConfiguration.setDelimiterParsingDisabled(isDelimiterParsingDisabled()); containerConfiguration.addConfigurationListener(eventPropagater); configList.add(containerConfiguration); overrideProperties = new ConcurrentMapConfiguration(); overrideProperties.setThrowExceptionOnMissing(isThrowExceptionOnMissing()); overrideProperties.setListDelimiter(getListDelimiter()); overrideProperties.setDelimiterParsingDisabled(isDelimiterParsingDisabled()); overrideProperties.addConfigurationListener(eventPropagater); fireEvent(EVENT_CLEAR, null, null, false); containerConfigurationChanged = false; invalidate(); }