public class H2EmbeddedDataSourceConfig extends ManagedDataSourceConfig<H2EmbeddedDataSourceConfig>
H2EmbeddedDataSource.
The configuration options can be chained as follows:
H2EmbeddedDataSourceConfig config = new H2EmbeddedDataSourceConfig()
.setUsername("username")
.setPassword("password")
.setMaxConnections(20)
.setMaxConnectionWait(new Duration(20, TimeUnit.MILLISECONDS)),
.setFilename(fileName)
.setInitScript("src/test/db/h2.ddl");
| Modifier and Type | Class and Description |
|---|---|
static class |
H2EmbeddedDataSourceConfig.AllowLiterals |
static class |
H2EmbeddedDataSourceConfig.Cipher |
static class |
H2EmbeddedDataSourceConfig.CompressLob |
| Constructor and Description |
|---|
H2EmbeddedDataSourceConfig() |
getMaxConnections, getMaxConnectionWait, setMaxConnections, setMaxConnectionWait@NotNull public @NotNull String getFilename()
@Config(value="db.filename") public H2EmbeddedDataSourceConfig setFilename(String filename)
public String getFilePassword()
@Config(value="db.file-password") public H2EmbeddedDataSourceConfig setFilePassword(String filePassword)
public String getInitScript()
@Config(value="db.init-script") public H2EmbeddedDataSourceConfig setInitScript(String initScript)
public H2EmbeddedDataSourceConfig.AllowLiterals getAllowLiterals()
NONE means literals of any kind are not allowed, only parameters and constants are allowed. NUMBERS mean only numerical and boolean literals are allowed. ALL means all literals are allowed (default).
@Config(value="db.allow-literals") public H2EmbeddedDataSourceConfig setAllowLiterals(H2EmbeddedDataSourceConfig.AllowLiterals allowLiterals)
public H2EmbeddedDataSourceConfig.CompressLob getCompressLob()
Allowed values are "NO", "LZF" and "DEFLATE"
@Config(value="db.compress-lob") public H2EmbeddedDataSourceConfig setCompressLob(H2EmbeddedDataSourceConfig.CompressLob compressLob)
public H2EmbeddedDataSourceConfig.Cipher getCipher()
@Config(value="db.cipher") public H2EmbeddedDataSourceConfig setCipher(H2EmbeddedDataSourceConfig.Cipher cipher)
public int getCacheSize()
@Config(value="db.cache-size") public H2EmbeddedDataSourceConfig setCacheSize(int cacheSize)
public long getMaxLengthInplaceLob()
@Config(value="db.inplace.lob.length.max") public H2EmbeddedDataSourceConfig setMaxLengthInplaceLob(long maxLengthInplaceLob)
public long getMaxMemoryRows()
@Config(value="db.rows.memory.max") public H2EmbeddedDataSourceConfig setMaxMemoryRows(long maxMemoryRows)
public boolean isMvccEnabled()
@Config(value="db.mvcc.enabled") public H2EmbeddedDataSourceConfig setMvccEnabled(boolean mvccEnabled)
Copyright © 2010–2019 Airlift. All rights reserved.