|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.client.ConfigurationDBRef
public class ConfigurationDBRef
Container for database configuration information, such as options around getting a database connection and options to control the lifecycle of connections and set connection parameters.
Nested Class Summary | |
---|---|
static class |
ConfigurationDBRef.ColumnChangeCaseEnum
Controls how output column names get reflected in the event type. |
static interface |
ConfigurationDBRef.ConnectionFactoryDesc
Marker for different connection factory settings. |
static class |
ConfigurationDBRef.ConnectionLifecycleEnum
Enum controlling connection lifecycle. |
static class |
ConfigurationDBRef.ConnectionSettings
Supplies connectioon-level settings for a given database name. |
static interface |
ConfigurationDBRef.DataCacheDesc
Marker for different cache settings. |
static class |
ConfigurationDBRef.DataSourceConnection
Connection factory settings for using a DataSource. |
static class |
ConfigurationDBRef.DriverManagerConnection
Connection factory settings for using a DriverManager. |
static class |
ConfigurationDBRef.ExpiryTimeCacheDesc
Expiring cache settings. |
static class |
ConfigurationDBRef.LRUCacheDesc
LRU cache settings. |
static class |
ConfigurationDBRef.MetadataOriginEnum
Indicates how the engine retrieves metadata about a statement's output columns. |
Constructor Summary | |
---|---|
ConfigurationDBRef()
Ctor. |
Method Summary | |
---|---|
void |
addJavaSqlTypesBinding(int sqlType,
Class javaTypeName)
Adds a mapping of a java.sql.Types type to a Java type. |
void |
addJavaSqlTypesBinding(int sqlType,
String javaTypeName)
Adds a mapping of a java.sql.Types type to a Java type. |
ConfigurationDBRef.ColumnChangeCaseEnum |
getColumnChangeCase()
Returns enum value determining how the engine changes case on output column names returned from statement or statement result set metadata. |
ConfigurationDBRef.ConnectionFactoryDesc |
getConnectionFactoryDesc()
Returns the descriptor controlling connection creation settings. |
ConfigurationDBRef.ConnectionLifecycleEnum |
getConnectionLifecycleEnum()
Returns the setting to control whether a new connection is obtained for each lookup, or connections are retained between lookups. |
ConfigurationDBRef.ConnectionSettings |
getConnectionSettings()
Returns the connection settings for this database. |
ConfigurationDBRef.DataCacheDesc |
getDataCacheDesc()
Return a query result data cache descriptor. |
Map<Integer,String> |
getJavaSqlTypesMapping()
Returns the mapping of types that the engine must perform when receiving output columns of that sql types. |
ConfigurationDBRef.MetadataOriginEnum |
getMetadataRetrievalEnum()
Returns an enumeration indicating how the engine retrieves metadata about the columns that a given SQL query returns. |
void |
setColumnChangeCase(ConfigurationDBRef.ColumnChangeCaseEnum columnChangeCaseEnum)
Sets enum value determining how the engine should change case on output column names returned from statement or statement result set metadata. |
void |
setConnectionAutoCommit(boolean value)
Sets the auto-commit connection settings for new connections to this database. |
void |
setConnectionCatalog(String catalog)
Sets the catalog name for new connections created for this database. |
void |
setConnectionLifecycleEnum(ConfigurationDBRef.ConnectionLifecycleEnum connectionLifecycleEnum)
Controls whether a new connection is obtained for each lookup, or connections are retained between lookups. |
void |
setConnectionReadOnly(boolean isReadOnly)
Sets the read-only flag on new connections created for this database. |
void |
setConnectionTransactionIsolation(int value)
Sets the transaction isolation level on new connections created for this database. |
void |
setDataSourceConnection(String contextLookupName,
Properties environmentProps)
Sets the connection factory to use DataSource to obtain a
connection. |
void |
setDriverManagerConnection(String className,
String url,
Properties connectionArgs)
Sets the connection factory to use DriverManager to obtain a
connection. |
void |
setDriverManagerConnection(String className,
String url,
String username,
String password)
Sets the connection factory to use DriverManager to obtain a
connection. |
void |
setDriverManagerConnection(String className,
String url,
String username,
String password,
Properties connectionArgs)
Sets the connection factory to use DriverManager to obtain a
connection. |
void |
setExpiryTimeCache(double maxAgeSeconds,
double purgeIntervalSeconds)
Configures an expiry-time cache of the given maximum age in seconds and pruge interval in seconds. |
void |
setLRUCache(int size)
Configures a LRU cache of the given size for the database. |
void |
setMetadataOrigin(ConfigurationDBRef.MetadataOriginEnum metadataOrigin)
Sets and indicator how the engine should retrieve metadata about the columns that a given SQL query returns. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigurationDBRef()
Method Detail |
---|
public void setDataSourceConnection(String contextLookupName, Properties environmentProps)
DataSource
to obtain a
connection.
contextLookupName
- is the object name to look up via InitialContext
environmentProps
- are the optional properties to pass to the contextpublic void setDriverManagerConnection(String className, String url, Properties connectionArgs)
DriverManager
to obtain a
connection.
className
- is the driver class name to lookup up via Class.forNameurl
- is the URLconnectionArgs
- are optional connection argumentspublic void setDriverManagerConnection(String className, String url, String username, String password)
DriverManager
to obtain a
connection.
className
- is the driver class name to lookup up via Class.forNameurl
- is the URLusername
- is the username to obtain a connectionpassword
- is the password to obtain a connectionpublic void setDriverManagerConnection(String className, String url, String username, String password, Properties connectionArgs)
DriverManager
to obtain a
connection.
className
- is the driver class name to lookup up via Class.forNameurl
- is the URLusername
- is the username to obtain a connectionpassword
- is the password to obtain a connectionconnectionArgs
- are optional connection argumentspublic void setConnectionAutoCommit(boolean value)
value
- is true to set auto-commit to true, or false to set auto-commit to false, or null to accepts the defaultpublic void setConnectionTransactionIsolation(int value)
value
- is the transaction isolation levelpublic void setConnectionReadOnly(boolean isReadOnly)
isReadOnly
- is the read-only flagpublic void setConnectionCatalog(String catalog)
catalog
- is the catalog namepublic ConfigurationDBRef.ConnectionSettings getConnectionSettings()
public ConfigurationDBRef.ConnectionLifecycleEnum getConnectionLifecycleEnum()
public void setConnectionLifecycleEnum(ConfigurationDBRef.ConnectionLifecycleEnum connectionLifecycleEnum)
connectionLifecycleEnum
- is an enum controlling connection allocationpublic ConfigurationDBRef.ConnectionFactoryDesc getConnectionFactoryDesc()
public void setLRUCache(int size)
size
- is the maximum number of entries before query results are evicted using.public void setExpiryTimeCache(double maxAgeSeconds, double purgeIntervalSeconds)
maxAgeSeconds
- is the maximum number of seconds before a query result is considered stale (also known as time-to-live)purgeIntervalSeconds
- is the interval at which the engine purges stale data from the cachepublic ConfigurationDBRef.DataCacheDesc getDataCacheDesc()
public ConfigurationDBRef.MetadataOriginEnum getMetadataRetrievalEnum()
The engine requires to retrieve result column names and types in order to build a resulting event type and perform expression type checking.
public void setMetadataOrigin(ConfigurationDBRef.MetadataOriginEnum metadataOrigin)
The engine requires to retrieve result column names and types in order to build a resulting event type and perform expression type checking.
metadataOrigin
- indication how to retrieve metadatapublic ConfigurationDBRef.ColumnChangeCaseEnum getColumnChangeCase()
public void setColumnChangeCase(ConfigurationDBRef.ColumnChangeCaseEnum columnChangeCaseEnum)
columnChangeCaseEnum
- change case enumspublic void addJavaSqlTypesBinding(int sqlType, String javaTypeName)
The mapping dictates to the engine how the output column should be represented as a Java Object.
Accepts a Java classname (fully-qualified or simple) or primitive type name
for the Java type parameter. See DatabaseTypeEnum
for valid values for the java type name.
sqlType
- is a java.sql.Types constant, for which output columns are converted to java typejavaTypeName
- is a Java class namepublic void addJavaSqlTypesBinding(int sqlType, Class javaTypeName)
The mapping dictates to the engine how the output column should be represented as a Java Object.
Accepts a Java class for the Java type parameter. See DatabaseTypeEnum
for valid values.
sqlType
- is a java.sql.Types constant, for which output columns are converted to java typejavaTypeName
- is a Java classpublic Map<Integer,String> getJavaSqlTypesMapping()
Types
types to Java types
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |