Class DerbyConnectionPoolProvider
- java.lang.Object
-
- edu.uiuc.ncsa.security.core.configuration.provider.HierarchicalConfigProvider<T>
-
- edu.uiuc.ncsa.security.storage.sql.ConnectionPoolProvider<ConnectionPool>
-
- edu.uiuc.ncsa.security.storage.sql.derby.DerbyConnectionPoolProvider
-
- All Implemented Interfaces:
ConfigurationTags
,CfgEventListener
,StorageConfigurationTags
,EventListener
,javax.inject.Provider<ConnectionPool>
public class DerbyConnectionPoolProvider extends ConnectionPoolProvider<ConnectionPool> implements StorageConfigurationTags
Created by Jeff Gaynor
on 5/2/12 at 1:46 PM
-
-
Field Summary
-
Fields inherited from class edu.uiuc.ncsa.security.storage.sql.ConnectionPoolProvider
BOOT_PASSWORD, CONNECTION_CLEANUP_ENABLE, CONNECTION_CLEANUP_INTERVAL, CONNECTION_ENABLE_QUEUE, CONNECTION_IDLE_TIMEOUT, CONNECTION_MAX, CONNECTION_QUEUE_INTERVAL, database, DATABASE, DEFAULT_CLEANUP_ENABLE, DEFAULT_CLEANUP_INTERVAL, DEFAULT_IDLE_TIMEOUT, DEFAULT_MAX_CONNECTIONS, DEFAULT_QUEUE_INTERVAL, DERBY_CREATE_SCRIPT, DERBY_FS_DEFAULT_BOOT_PASSWORD, DERBY_FS_DEFAULT_PASSWORD, DERBY_FS_DEFAULT_SCHEMA, DERBY_FS_DEFAULT_USER, DERBY_STORE_TYPE, driver, DRIVER, host, HOST, PARAMETERS, PASSWORD, port, PORT, schema, SCHEMA, USE_SSL, USERNAME, useSSL
-
Fields inherited from interface edu.uiuc.ncsa.security.core.configuration.ConfigurationTags
DEBUG
-
Fields inherited from interface edu.uiuc.ncsa.security.core.configuration.StorageConfigurationTags
AGGREGATE_STORE, DERBY_STORE, DERBY_STORE_TYPE_FILE, DERBY_STORE_TYPE_MEMORY, DERBY_STORE_TYPE_SERVER, FILE_STORE, FS_DATA, FS_INDEX, FS_PATH, FS_REMOVE_EMPTY_FILES, FS_REMOVE_FAILED_FILES, MARIADB_STORE, MEMORY_STORE, MYSQL_STORE, POSTGRESQL_STORE, SQL_DATABASE, SQL_PREFIX, SQL_SCHEMA, SQL_TABLENAME
-
-
Constructor Summary
Constructors Constructor Description DerbyConnectionPoolProvider()
DerbyConnectionPoolProvider(String database)
DerbyConnectionPoolProvider(String database, String schema)
DerbyConnectionPoolProvider(String database, String schema, String host, int port, String driver, boolean useSSL)
-
Method Summary
-
Methods inherited from class edu.uiuc.ncsa.security.storage.sql.ConnectionPoolProvider
checkTime, checkValue, checkValue, checkValue, checkValue, checkValue, getDatabase, getDriver, getHost, getPort, getSchema, isUseSSL, setPoolParameters
-
Methods inherited from class edu.uiuc.ncsa.security.core.configuration.provider.HierarchicalConfigProvider
addListener, fireComponentFound, getAttribute, getAttribute, getBooleanAttribute, getConfig, getConfigurationAt, getIntAttribute, getIntAttribute, getListeners, hasA, isA, removeListener, setConfig
-
-
-
-
Constructor Detail
-
DerbyConnectionPoolProvider
public DerbyConnectionPoolProvider()
-
DerbyConnectionPoolProvider
public DerbyConnectionPoolProvider(String database, String schema, String host, int port, String driver, boolean useSSL)
-
DerbyConnectionPoolProvider
public DerbyConnectionPoolProvider(String database)
-
-
Method Detail
-
newInstance
public static DerbyConnectionPoolProvider newInstance()
Use this for builder/factory pattern.- Returns:
-
getStoreType
public String getStoreType()
-
setStoreType
public DerbyConnectionPoolProvider setStoreType(String storeType)
-
getUsername
public String getUsername()
-
setUsername
public DerbyConnectionPoolProvider setUsername(String username)
-
getPassword
public String getPassword()
-
setPassword
public DerbyConnectionPoolProvider setPassword(String password)
-
getBootPassword
public String getBootPassword()
-
setBootPassword
public DerbyConnectionPoolProvider setBootPassword(String bootPassword)
-
getRootDirectory
public String getRootDirectory()
-
setRootDirectory
public DerbyConnectionPoolProvider setRootDirectory(String rootDirectory)
-
checkEvent
protected boolean checkEvent(CfgEvent cfgEvent)
Description copied from class:HierarchicalConfigProvider
Checks that the event applies to this component. The type is the component and the target is Normally you set the component key as a static field in the class (e.g. "mysql") and pass it along in the theCfgEventListener.componentFound(CfgEvent)
method. If checkEvent fails, do no more processing with the event.- Specified by:
checkEvent
in classHierarchicalConfigProvider<ConnectionPool>
- Returns:
-
componentFound
public Object componentFound(CfgEvent configurationEvent)
- Specified by:
componentFound
in interfaceCfgEventListener
-
getCreateScriptPath
public String getCreateScriptPath()
-
get
public ConnectionPool get()
- Specified by:
get
in interfacejavax.inject.Provider<ConnectionPool>
-
createNewPool
public DerbyConnectionPool createNewPool(DerbyConnectionParameters x)
So this may be overriden.- Parameters:
x
-- Returns:
-
getCreateScript
public List<String> getCreateScript()
The default creation script is injected- Returns:
-
setCreateScript
public DerbyConnectionPoolProvider setCreateScript(List<String> createScript)
-
setHost
public DerbyConnectionPoolProvider setHost(String host)
- Overrides:
setHost
in classConnectionPoolProvider<ConnectionPool>
-
setDriver
public DerbyConnectionPoolProvider setDriver(String driver)
- Overrides:
setDriver
in classConnectionPoolProvider<ConnectionPool>
-
setPort
public DerbyConnectionPoolProvider setPort(int port)
- Overrides:
setPort
in classConnectionPoolProvider<ConnectionPool>
-
setSchema
public DerbyConnectionPoolProvider setSchema(String schema)
- Overrides:
setSchema
in classConnectionPoolProvider<ConnectionPool>
-
setDatabase
public DerbyConnectionPoolProvider setDatabase(String database)
- Overrides:
setDatabase
in classConnectionPoolProvider<ConnectionPool>
-
setUseSSL
public DerbyConnectionPoolProvider setUseSSL(boolean useSSL)
- Overrides:
setUseSSL
in classConnectionPoolProvider<ConnectionPool>
-
-