public final class MapBasedConnPropsBuilder extends Object
ConnectionProperties
using the settings obtained from a Map.
Use the keys from the various KEY_* fields to properly populate the Map.
Modifier and Type | Method and Description |
---|---|
static ConnectionProperties |
build(Map<String,String> properties)
Initialize a set of connection properties based on key / values in a
HashMap . |
static ConnectionProperties |
buildDefault()
Creates a set of connection properties that use the defaults as specified in this class.
|
public static final String DEFAULT_DRIVER
ConnectionProperties.setDriver(String)
public static final String DEFAULT_URL
ConnectionProperties.setUrl(String)
public static final String DEFAULT_USERNAME
ConnectionProperties.setUrl(String)
public static final String DEFAULT_PASSWORD
ConnectionProperties.setPassword(String)
public static final int DEFAULT_MAX_TOTAL
public static final int DEFAULT_MAX_IDLE
public static final int DEFAULT_MIN_IDLE
public static final long DEFAULT_MAX_WAIT_MILLIS
public static final boolean DEFAULT_TEST_ON_CREATE
public static final boolean DEFAULT_TEST_ON_BORROW
public static final boolean DEFAULT_TEST_ON_RETURN
public static final boolean DEFAULT_TEST_WHILE_IDLE
public static final long DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS
public static final int DEFAULT_NUM_TESTS_PER_EVICITON_RUN
public static final long DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS
public static final long DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS
public static final boolean DEFAULT_LIFO
public static final boolean DEFAULT_AUTO_COMMIT
public static final boolean DEFAULT_READ_ONLY
public static final int DEFAULT_TRANSACTION_ISOLATION
public static final boolean DEFAULT_CACHE_STATE
public static final String DEFAULT_VALIDATION_QUERY
public static final long DEFAULT_MAX_CONN_LIFETIME_MILLIS
public static final String KEY_DRIVER
public static final String KEY_URL
public static final String KEY_USERNAME
public static final String KEY_PASSWORD
public static final String KEY_MAX_TOTAL
public static final String KEY_MAX_IDLE
public static final String KEY_MIN_IDLE
public static final String KEY_MAX_WAIT_MILLIS
public static final String KEY_TEST_ON_CREATE
public static final String KEY_TEST_ON_BORROW
public static final String KEY_TEST_ON_RETURN
public static final String KEY_TEST_WHILE_IDLE
public static final String KEY_TIME_BETWEEN_EVICTION_RUNS_MILLIS
public static final String KEY_NUM_TESTS_PER_EVICITON_RUN
public static final String KEY_MIN_EVICTABLE_IDLE_TIME_MILLIS
public static final String KEY_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS
public static final String KEY_LIFO
public static final String KEY_AUTO_COMMIT
public static final String KEY_READ_ONLY
public static final String KEY_TRANSACTION_ISOLATION
public static final String KEY_CACHE_STATE
public static final String KEY_VALIDATION_QUERY
public static final String KEY_MAX_CONN_LIFETIME_MILLIS
public static ConnectionProperties buildDefault()
MapBasedConnPropsBuilder
public static ConnectionProperties build(Map<String,String> properties)
HashMap
.properties
- A HashMap
with configuration properties, using the keys as specified in this classConnectionProperties
object with default values, plus the provided parametersNullPointerException
- When properties
is null
Copyright © 2014–2016 Michael Beiter