Package com.evolveum.midpoint.repo.sqale
Class SqaleRepositoryConfiguration
java.lang.Object
com.evolveum.midpoint.repo.sqale.SqaleRepositoryConfiguration
- All Implemented Interfaces:
JdbcRepositoryConfiguration
Common part of the SQL-based repository configuration.
Contains JDBC/datasource setup, connection pool configuration, but no framework/ORM stuff.
-
Field Summary
FieldsFields inherited from interface com.evolveum.midpoint.repo.sqlbase.JdbcRepositoryConfiguration
PROPERTY_CREATE_MISSING_CUSTOM_COLUMNS, PROPERTY_DATABASE, PROPERTY_DATASOURCE, PROPERTY_DRIVER_CLASS_NAME, PROPERTY_FULL_OBJECT_FORMAT, PROPERTY_IDLE_TIMEOUT, PROPERTY_INITIALIZATION_FAIL_TIMEOUT, PROPERTY_ITERATIVE_SEARCH_BY_PAGING_BATCH_SIZE, PROPERTY_JDBC_PASSWORD, PROPERTY_JDBC_PASSWORD_FILE, PROPERTY_JDBC_URL, PROPERTY_JDBC_USERNAME, PROPERTY_KEEPALIVE_TIME, PROPERTY_LEAK_DETECTION_THRESHOLD, PROPERTY_MAX_LIFETIME, PROPERTY_MAX_POOL_SIZE, PROPERTY_MIN_POOL_SIZE, PROPERTY_PERFORMANCE_STATISTICS_FILE, PROPERTY_PERFORMANCE_STATISTICS_LEVEL, PROPERTY_USE_ZIP, PROPERTY_USE_ZIP_AUDIT -
Constructor Summary
ConstructorsConstructorDescriptionSqaleRepositoryConfiguration(@NotNull org.apache.commons.configuration2.Configuration configuration) -
Method Summary
Modifier and TypeMethodDescription@NotNull SupportedDatabaseReturns serialization format (language) for writing fullObject.longintgetJdbcUrl(@NotNull String applicationName) Allows distinguishing connections for various usages like repository, audit, scheduler.intintintlongReturns threshold duration for SQL, after which it should be logged on warning level.voidinit()static SqaleRepositoryConfigurationinitForAudit(@NotNull SqaleRepositoryConfiguration mainRepoConfig, org.apache.commons.configuration2.Configuration auditConfig) Creates a copy of provided configuration for audit and applies override from config.xml.booleanbooleanbooleanisUseZip()We leave potential compression to PG, for us the values are plain.booleanWe leave potential compression to PG, for us the values are plain.booleanprotected voidvoidsetIterativeSearchByPagingBatchSize(int iterativeSearchByPagingBatchSize) booleanIf true, thenConnection.setReadOnly(boolean)is used for read only transactions andJdbcRepositoryConfiguration.getReadOnlyTransactionStatement()is ignored.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.repo.sqlbase.JdbcRepositoryConfiguration
getReadOnlyTransactionStatement, isUsingH2, isUsingOracle, isUsingPostgreSQL, isUsingSQLServer
-
Field Details
-
APPLICATION_NAME_JDBC_PARAM
- See Also:
-
-
Constructor Details
-
SqaleRepositoryConfiguration
public SqaleRepositoryConfiguration(@NotNull @NotNull org.apache.commons.configuration2.Configuration configuration)
-
-
Method Details
-
init
-
getDatabaseType
- Specified by:
getDatabaseTypein interfaceJdbcRepositoryConfiguration
-
getDataSource
- Specified by:
getDataSourcein interfaceJdbcRepositoryConfiguration
-
notEmpty
-
getDriverClassName
- Specified by:
getDriverClassNamein interfaceJdbcRepositoryConfiguration
-
getJdbcUrl
- Specified by:
getJdbcUrlin interfaceJdbcRepositoryConfiguration
-
getJdbcUrl
Description copied from interface:JdbcRepositoryConfigurationAllows distinguishing connections for various usages like repository, audit, scheduler. By default, this doesn't do anything, but works for new repository.- Specified by:
getJdbcUrlin interfaceJdbcRepositoryConfiguration
-
getJdbcUsername
- Specified by:
getJdbcUsernamein interfaceJdbcRepositoryConfiguration
-
getJdbcPassword
- Specified by:
getJdbcPasswordin interfaceJdbcRepositoryConfiguration
-
isUseZip
public boolean isUseZip()We leave potential compression to PG, for us the values are plain.- Specified by:
isUseZipin interfaceJdbcRepositoryConfiguration
-
isUseZipAudit
public boolean isUseZipAudit()We leave potential compression to PG, for us the values are plain.- Specified by:
isUseZipAuditin interfaceJdbcRepositoryConfiguration
-
getFullObjectFormat
Returns serialization format (language) for writing fullObject. Also seeJdbcRepositoryConfiguration.PROPERTY_FULL_OBJECT_FORMAT.- Specified by:
getFullObjectFormatin interfaceJdbcRepositoryConfiguration
-
isEmbedded
public boolean isEmbedded()- Specified by:
isEmbeddedin interfaceJdbcRepositoryConfiguration
-
getDefaultEmbeddedJdbcUrlPrefix
- Specified by:
getDefaultEmbeddedJdbcUrlPrefixin interfaceJdbcRepositoryConfiguration
-
isUsing
- Specified by:
isUsingin interfaceJdbcRepositoryConfiguration
-
getTransactionIsolation
- Specified by:
getTransactionIsolationin interfaceJdbcRepositoryConfiguration
-
useSetReadOnlyOnConnection
public boolean useSetReadOnlyOnConnection()Description copied from interface:JdbcRepositoryConfigurationIf true, thenConnection.setReadOnly(boolean)is used for read only transactions andJdbcRepositoryConfiguration.getReadOnlyTransactionStatement()is ignored.- Specified by:
useSetReadOnlyOnConnectionin interfaceJdbcRepositoryConfiguration
-
getMinPoolSize
public int getMinPoolSize()- Specified by:
getMinPoolSizein interfaceJdbcRepositoryConfiguration
-
getMaxPoolSize
public int getMaxPoolSize()- Specified by:
getMaxPoolSizein interfaceJdbcRepositoryConfiguration
-
getMaxLifetime
- Specified by:
getMaxLifetimein interfaceJdbcRepositoryConfiguration
-
getIdleTimeout
- Specified by:
getIdleTimeoutin interfaceJdbcRepositoryConfiguration
-
getInitializationFailTimeout
public long getInitializationFailTimeout()- Specified by:
getInitializationFailTimeoutin interfaceJdbcRepositoryConfiguration
-
getKeepaliveTime
- Specified by:
getKeepaliveTimein interfaceJdbcRepositoryConfiguration
-
getLeakDetectionThreshold
- Specified by:
getLeakDetectionThresholdin interfaceJdbcRepositoryConfiguration
-
getPerformanceStatisticsFile
- Specified by:
getPerformanceStatisticsFilein interfaceJdbcRepositoryConfiguration
-
getPerformanceStatisticsLevel
public int getPerformanceStatisticsLevel()- Specified by:
getPerformanceStatisticsLevelin interfaceJdbcRepositoryConfiguration
-
getIterativeSearchByPagingBatchSize
public int getIterativeSearchByPagingBatchSize()- Specified by:
getIterativeSearchByPagingBatchSizein interfaceJdbcRepositoryConfiguration
-
setIterativeSearchByPagingBatchSize
public void setIterativeSearchByPagingBatchSize(int iterativeSearchByPagingBatchSize) -
isCreateMissingCustomColumns
public boolean isCreateMissingCustomColumns()- Specified by:
isCreateMissingCustomColumnsin interfaceJdbcRepositoryConfiguration
-
getSqlDurationWarningMs
public long getSqlDurationWarningMs()Returns threshold duration for SQL, after which it should be logged on warning level. Value of 0 or less means that this warning is disabled. -
initForAudit
public static SqaleRepositoryConfiguration initForAudit(@NotNull @NotNull SqaleRepositoryConfiguration mainRepoConfig, org.apache.commons.configuration2.Configuration auditConfig) Creates a copy of provided configuration for audit and applies override from config.xml. This is used when the same data source is used by audit and repository.
-