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
Fields 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
ConstructorDescriptionSqaleRepositoryConfiguration
(@NotNull org.apache.commons.configuration2.Configuration configuration) -
Method Summary
Modifier and TypeMethodDescription@NotNull SupportedDatabase
Returns serialization format (language) for writing fullObject.long
int
getJdbcUrl
(@NotNull String applicationName) Allows distinguishing connections for various usages like repository, audit, scheduler.int
int
int
long
Returns threshold duration for SQL, after which it should be logged on warning level.void
init()
static SqaleRepositoryConfiguration
initForAudit
(@NotNull SqaleRepositoryConfiguration mainRepoConfig, org.apache.commons.configuration2.Configuration auditConfig) Creates a copy of provided configuration for audit and applies override from config.xml.boolean
boolean
boolean
isUseZip()
We leave potential compression to PG, for us the values are plain.boolean
We leave potential compression to PG, for us the values are plain.boolean
protected void
void
setIterativeSearchByPagingBatchSize
(int iterativeSearchByPagingBatchSize) boolean
If 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, wait
Methods 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:
getDatabaseType
in interfaceJdbcRepositoryConfiguration
-
getDataSource
- Specified by:
getDataSource
in interfaceJdbcRepositoryConfiguration
-
notEmpty
-
getDriverClassName
- Specified by:
getDriverClassName
in interfaceJdbcRepositoryConfiguration
-
getJdbcUrl
- Specified by:
getJdbcUrl
in interfaceJdbcRepositoryConfiguration
-
getJdbcUrl
Description copied from interface:JdbcRepositoryConfiguration
Allows distinguishing connections for various usages like repository, audit, scheduler. By default, this doesn't do anything, but works for new repository.- Specified by:
getJdbcUrl
in interfaceJdbcRepositoryConfiguration
-
getJdbcUsername
- Specified by:
getJdbcUsername
in interfaceJdbcRepositoryConfiguration
-
getJdbcPassword
- Specified by:
getJdbcPassword
in interfaceJdbcRepositoryConfiguration
-
isUseZip
public boolean isUseZip()We leave potential compression to PG, for us the values are plain.- Specified by:
isUseZip
in interfaceJdbcRepositoryConfiguration
-
isUseZipAudit
public boolean isUseZipAudit()We leave potential compression to PG, for us the values are plain.- Specified by:
isUseZipAudit
in interfaceJdbcRepositoryConfiguration
-
getFullObjectFormat
Returns serialization format (language) for writing fullObject. Also seeJdbcRepositoryConfiguration.PROPERTY_FULL_OBJECT_FORMAT
.- Specified by:
getFullObjectFormat
in interfaceJdbcRepositoryConfiguration
-
isEmbedded
public boolean isEmbedded()- Specified by:
isEmbedded
in interfaceJdbcRepositoryConfiguration
-
getDefaultEmbeddedJdbcUrlPrefix
- Specified by:
getDefaultEmbeddedJdbcUrlPrefix
in interfaceJdbcRepositoryConfiguration
-
isUsing
- Specified by:
isUsing
in interfaceJdbcRepositoryConfiguration
-
getTransactionIsolation
- Specified by:
getTransactionIsolation
in interfaceJdbcRepositoryConfiguration
-
useSetReadOnlyOnConnection
public boolean useSetReadOnlyOnConnection()Description copied from interface:JdbcRepositoryConfiguration
If true, thenConnection.setReadOnly(boolean)
is used for read only transactions andJdbcRepositoryConfiguration.getReadOnlyTransactionStatement()
is ignored.- Specified by:
useSetReadOnlyOnConnection
in interfaceJdbcRepositoryConfiguration
-
getMinPoolSize
public int getMinPoolSize()- Specified by:
getMinPoolSize
in interfaceJdbcRepositoryConfiguration
-
getMaxPoolSize
public int getMaxPoolSize()- Specified by:
getMaxPoolSize
in interfaceJdbcRepositoryConfiguration
-
getMaxLifetime
- Specified by:
getMaxLifetime
in interfaceJdbcRepositoryConfiguration
-
getIdleTimeout
- Specified by:
getIdleTimeout
in interfaceJdbcRepositoryConfiguration
-
getInitializationFailTimeout
public long getInitializationFailTimeout()- Specified by:
getInitializationFailTimeout
in interfaceJdbcRepositoryConfiguration
-
getKeepaliveTime
- Specified by:
getKeepaliveTime
in interfaceJdbcRepositoryConfiguration
-
getLeakDetectionThreshold
- Specified by:
getLeakDetectionThreshold
in interfaceJdbcRepositoryConfiguration
-
getPerformanceStatisticsFile
- Specified by:
getPerformanceStatisticsFile
in interfaceJdbcRepositoryConfiguration
-
getPerformanceStatisticsLevel
public int getPerformanceStatisticsLevel()- Specified by:
getPerformanceStatisticsLevel
in interfaceJdbcRepositoryConfiguration
-
getIterativeSearchByPagingBatchSize
public int getIterativeSearchByPagingBatchSize()- Specified by:
getIterativeSearchByPagingBatchSize
in interfaceJdbcRepositoryConfiguration
-
setIterativeSearchByPagingBatchSize
public void setIterativeSearchByPagingBatchSize(int iterativeSearchByPagingBatchSize) -
isCreateMissingCustomColumns
public boolean isCreateMissingCustomColumns()- Specified by:
isCreateMissingCustomColumns
in 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.
-