public class ServerRuntimeBuilder extends Object
Modifier | Constructor and Description |
---|---|
protected |
ServerRuntimeBuilder(String name)
Creates a builder with a fixed name of the DataDomain of the resulting
ServerRuntime.
|
Modifier and Type | Method and Description |
---|---|
ServerRuntimeBuilder |
addConfig(String configurationLocation) |
ServerRuntimeBuilder |
addConfigs(Collection<String> configurationLocations) |
ServerRuntimeBuilder |
addConfigs(String... configurationLocations) |
ServerRuntimeBuilder |
addModule(Module module) |
ServerRuntimeBuilder |
addModules(Collection<Module> modules) |
ServerRuntime |
build() |
ServerRuntimeBuilder |
dataSource(DataSource dataSource)
Sets a DataSource that will override any DataSources found in the
mapping.
|
ServerRuntimeBuilder |
disableModulesAutoLoading()
Disables DI module auto-loading.
|
ServerRuntimeBuilder |
jdbcDriver(String driver)
Sets a driver Java class for the default DataSource.
|
ServerRuntimeBuilder |
jndiDataSource(String location)
Sets JNDI location for the default DataSource.
|
ServerRuntimeBuilder |
maxConnections(int maxConnections) |
ServerRuntimeBuilder |
maxQueueWaitTime(long maxQueueWaitTime) |
ServerRuntimeBuilder |
minConnections(int minConnections) |
ServerRuntimeBuilder |
password(String password)
Sets a password for the default DataSource.
|
ServerRuntimeBuilder |
url(String url)
Sets a database URL for the default DataSource.
|
ServerRuntimeBuilder |
user(String user)
Sets a user name for the default DataSource.
|
ServerRuntimeBuilder |
validationQuery(String validationQuery)
Sets a validation query for the default DataSource.
|
protected ServerRuntimeBuilder(String name)
public ServerRuntimeBuilder disableModulesAutoLoading()
ModuleLoader
service provider inetrface. If you decide to disable auto-loading,
make sure you provide all the modules that you need.public ServerRuntimeBuilder dataSource(DataSource dataSource)
DataSourceBuilder
public ServerRuntimeBuilder jndiDataSource(String location)
public ServerRuntimeBuilder url(String url)
public ServerRuntimeBuilder jdbcDriver(String driver)
public ServerRuntimeBuilder validationQuery(String validationQuery)
validationQuery
- a SQL string that returns some result. It will be used to
validate connections in the pool.public ServerRuntimeBuilder maxQueueWaitTime(long maxQueueWaitTime)
public ServerRuntimeBuilder user(String user)
public ServerRuntimeBuilder password(String password)
public ServerRuntimeBuilder minConnections(int minConnections)
public ServerRuntimeBuilder maxConnections(int maxConnections)
public ServerRuntimeBuilder addConfig(String configurationLocation)
public ServerRuntimeBuilder addConfigs(String... configurationLocations)
public ServerRuntimeBuilder addConfigs(Collection<String> configurationLocations)
public ServerRuntimeBuilder addModule(Module module)
public ServerRuntimeBuilder addModules(Collection<Module> modules)
public ServerRuntime build()
Copyright © 2001–2019 Apache Cayenne. All rights reserved.