/** * Load the settings from the properties file. */ public void loadSettings(PropertiesWrapper p) { queryTuning = p.getBoolean("autoTune.queryTuning", queryTuning); queryTuningAddVersion = p.getBoolean("autoTune.queryTuningAddVersion", queryTuningAddVersion); queryTuningFile = p.get("autoTune.queryTuningFile", queryTuningFile); skipGarbageCollectionOnShutdown = p.getBoolean("autoTune.skipGarbageCollectionOnShutdown", skipGarbageCollectionOnShutdown); skipProfileReportingOnShutdown = p.getBoolean("autoTune.skipProfileReportingOnShutdown", skipProfileReportingOnShutdown); mode = p.getEnum(AutoTuneMode.class, "autoTune.mode", mode); profiling = p.getBoolean("autoTune.profiling", profiling); profilingBase = p.getInt("autoTune.profilingBase", profilingBase); profilingRate = p.getDouble("autoTune.profilingRate", profilingRate); profilingFile = p.get("autoTune.profilingFile", profilingFile); profilingUpdateFrequency = p.getInt("autoTune.profilingUpdateFrequency", profilingUpdateFrequency); } }
/** * Load settings specified in properties files. */ public void loadSettings(PropertiesWrapper properties) { active = properties.getBoolean("docstore.active", active); url = properties.get("docstore.url", url); persist = properties.getEnum(DocStoreMode.class, "docstore.persist", persist); bulkBatchSize = properties.getInt("docstore.bulkBatchSize", bulkBatchSize); generateMapping = properties.getBoolean("docstore.generateMapping", generateMapping); dropCreate = properties.getBoolean("docstore.dropCreate", dropCreate); create = properties.getBoolean("docstore.create", create); mappingPath = properties.get("docstore.mappingPath", mappingPath); mappingSuffix = properties.get("docstore.mappingSuffix", mappingSuffix); pathToResources = properties.get("docstore.pathToResources", pathToResources); } }
int srid = p.getInt("geometrySRID", 0); if (srid > 0) { dbTypeConfig.setGeometrySRID(srid); useJtaTransactionManager = p.getBoolean("useJtaTransactionManager", useJtaTransactionManager); backgroundExecutorSchedulePoolSize = p.getInt("backgroundExecutorSchedulePoolSize", backgroundExecutorSchedulePoolSize); backgroundExecutorShutdownSecs = p.getInt("backgroundExecutorShutdownSecs", backgroundExecutorShutdownSecs); disableClasspathSearch = p.getBoolean("disableClasspathSearch", disableClasspathSearch); currentUserProvider = createInstance(p, CurrentUserProvider.class, "currentUserProvider", currentUserProvider); persistBatchOnCascade = p.getEnum(PersistBatch.class, "persistBatchOnCascade", persistBatchOnCascade); int batchSize = p.getInt("batch.size", persistBatchSize); persistBatchSize = p.getInt("persistBatchSize", batchSize); historyTableSuffix = p.get("historyTableSuffix", historyTableSuffix); dataSourceJndiName = p.get("dataSourceJndiName", dataSourceJndiName); jdbcFetchSizeFindEach = p.getInt("jdbcFetchSizeFindEach", jdbcFetchSizeFindEach); jdbcFetchSizeFindList = p.getInt("jdbcFetchSizeFindList", jdbcFetchSizeFindList); databaseSequenceBatchSize = p.getInt("databaseSequenceBatchSize", databaseSequenceBatchSize); databaseBooleanTrue = p.get("databaseBooleanTrue", databaseBooleanTrue); databaseBooleanFalse = p.get("databaseBooleanFalse", databaseBooleanFalse); jodaLocalTimeMode = p.get("jodaLocalTimeMode", jodaLocalTimeMode); lazyLoadBatchSize = p.getInt("lazyLoadBatchSize", lazyLoadBatchSize); queryBatchSize = p.getInt("queryBatchSize", queryBatchSize);