private static boolean getRefreshAfterWrite(Properties properties) { return ConfigurationParseHelper.getBooleanValue( properties, ElasticsearchEnvironment.REFRESH_AFTER_WRITE, ElasticsearchEnvironment.Defaults.REFRESH_AFTER_WRITE ); }
@Override public String getProperty(String key, String defaultValue) { String val = getProperty( key ); return ( val == null ) ? defaultValue : val; }
@Override public synchronized Set<Object> keySet() { initPropertyNames(); return propertyNames; }
@Override public void initialize(IndexManager indexManager, Properties indexProperties) { super.initialize( indexManager, indexProperties ); operationMax = ConfigurationParseHelper.getIntValue( indexProperties, "operation_limit.max", -1 ); transactionMax = ConfigurationParseHelper.getIntValue( indexProperties, "transaction_limit.max", -1 ); }
private Integer parseBoolean(String value) { boolean v = ConfigurationParseHelper.parseBoolean( value, "Invalid value for " + cfgKey + ": " + value ); return v ? TRUE : FALSE; }
/** * Specific parameters may override to provide additional keywords support. * * @param value the string value as in configuration file * @return the integer value going to be set as parameter * @throws org.hibernate.search.exception.SearchException for unrecognized values */ public Integer parseVal(String value) { return ConfigurationParseHelper.parseInt( value, "Invalid value for " + cfgKey + ": " + value ); }
private static JChannel createChannel() throws Exception { JChannel channel = new JChannel( ConfigurationParseHelper.locateConfig( JGroupsCommonTest.TESTING_JGROUPS_CONFIGURATION_FILE ) ); channel.connect( "JGroupsCommonTest" + JGroupsCommonTest.CHANNEL_NAME ); return channel; }
/** * <p>isExclusiveIndexUsageEnabled. * * @param indexProps a {@link java.util.Properties} object. * @return {@code true} when a lock on the index will not be released until the * SearchIntegrator (or SessionFactory) is closed. Default to {@code false} */ public static boolean isExclusiveIndexUsageEnabled(Properties indexProps) { return ConfigurationParseHelper.getBooleanValue( indexProps, Environment.EXCLUSIVE_INDEX_USE, true ); }
private static int getIndexManagementWaitTimeout(Properties properties) { int timeout = ConfigurationParseHelper.getIntValue( properties, ElasticsearchEnvironment.INDEX_MANAGEMENT_WAIT_TIMEOUT, ElasticsearchEnvironment.Defaults.INDEX_MANAGEMENT_WAIT_TIMEOUT ); if ( timeout < 0 ) { throw LOG.negativeTimeoutValue( timeout ); } return timeout; }
@Override public synchronized Set<Object> keySet() { initPropertyNames(); return propertyNames; }
@Override public String getProperty(String key, String defaultValue) { String val = getProperty( key ); return ( val == null ) ? defaultValue : val; }
private Integer parseBoolean(String value) { boolean v = ConfigurationParseHelper.parseBoolean( value, "Invalid value for " + cfgKey + ": " + value ); return v ? TRUE : FALSE; }
/** * Specific parameters may override to provide additional keywords support. * * @param value the string value as in configuration file * @return the integer value going to be set as parameter * @throws org.hibernate.search.exception.SearchException for unrecognized values */ public Integer parseVal(String value) { return ConfigurationParseHelper.parseInt( value, "Invalid value for " + cfgKey + ": " + value ); }
public void setConfigurationProperties(Properties configurationProperties) { this.configurationProperties = configurationProperties; this.enlistWorkerInTransaction = ConfigurationParseHelper.getBooleanValue( configurationProperties, Environment.WORKER_ENLIST_IN_TRANSACTION, false ); }
/** * @throws UnsupportedOperationException always */ @Override public synchronized Enumeration<Object> keys() { initPropertyNames(); return Collections.enumeration( propertyNames ); }
private static boolean getRefreshAfterWrite(Properties properties) { return ConfigurationParseHelper.getBooleanValue( properties, ElasticsearchEnvironment.REFRESH_AFTER_WRITE, ElasticsearchEnvironment.Defaults.REFRESH_AFTER_WRITE ); }
@Override public synchronized boolean isEmpty() { initPropertyNames(); return propertyNames.isEmpty(); }
/** * <p>isExclusiveIndexUsageEnabled. * * @param indexProps a {@link java.util.Properties} object. * @return {@code true} when a lock on the index will not be released until the * SearchIntegrator (or SessionFactory) is closed. Default to {@code false} */ public static boolean isExclusiveIndexUsageEnabled(Properties indexProps) { return ConfigurationParseHelper.getBooleanValue( indexProps, Environment.EXCLUSIVE_INDEX_USE, true ); }
@Override public synchronized boolean contains(Object value) { initPropertyNames(); return propertyNames.contains( value ); }
public void setConfigurationProperties(Properties configurationProperties) { this.configurationProperties = configurationProperties; this.enlistWorkerInTransaction = ConfigurationParseHelper.getBooleanValue( configurationProperties, Environment.WORKER_ENLIST_IN_TRANSACTION, false ); }