Modifier and Type | Method and Description |
---|---|
Database |
build()
Returns a
Database . |
Database.Builder |
connectionProvider(ConnectionProvider cp)
Sets the connection provider.
|
Database.Builder |
nonTransactionalScheduler(rx.functions.Func0<rx.Scheduler> factory)
Sets the non transactional scheduler.
|
Database.Builder |
nonTransactionalSchedulerOnCurrentThread()
Requests that the non transactional queries are run using
Schedulers.trampoline() . |
Database.Builder |
password(String password) |
Database.Builder |
pool(int minPoolSize,
int maxPoolSize)
Sets the
ConnectionProvider to use a connection pool with the
given jdbc url and pool size. |
Database.Builder |
pooled(String url)
Sets the
ConnectionProvider to use a connection pool with the
given jdbc url and min pool size of 0, max pool size of 10. |
Database.Builder |
url(String url)
Sets the jdbc url.
|
Database.Builder |
username(String username) |
public Database.Builder connectionProvider(ConnectionProvider cp)
cp
- public Database.Builder url(String url)
url
- public Database.Builder username(String username)
public Database.Builder password(String password)
public Database.Builder pool(int minPoolSize, int maxPoolSize)
ConnectionProvider
to use a connection pool with the
given jdbc url and pool size.url
- minPoolSize
- maxPoolSize
- public Database.Builder pooled(String url)
ConnectionProvider
to use a connection pool with the
given jdbc url and min pool size of 0, max pool size of 10.url
- public Database.Builder nonTransactionalScheduler(rx.functions.Func0<rx.Scheduler> factory)
factory
- public Database.Builder nonTransactionalSchedulerOnCurrentThread()
Schedulers.trampoline()
.Copyright © 2014–2015. All rights reserved.