CacheableFactory
, ModuleControl
, ModuleSupportable
, PropertySetCallback
, LanguageConnectionFactory
public class GenericLanguageConnectionFactory extends java.lang.Object implements LanguageConnectionFactory, CacheableFactory, PropertySetCallback, ModuleControl, ModuleSupportable
Modifier and Type | Field | Description |
---|---|---|
private int |
cacheSize |
|
private ClassFactory |
classFactory |
|
private DataValueFactory |
dvf |
|
private ExecutionFactory |
ef |
|
private JavaFactory |
javaFactory |
|
private int |
nextLCCInstanceNumber |
|
private OptimizerFactory |
of |
|
private PropertyFactory |
pf |
|
private CacheManager |
singleStatementCache |
|
private TypeCompilerFactory |
tcf |
|
private UUIDFactory |
uuidFactory |
MODULE
Constructor | Description |
---|---|
GenericLanguageConnectionFactory() |
Modifier and Type | Method | Description |
---|---|---|
Serviceable |
apply(java.lang.String key,
java.io.Serializable value,
java.util.Dictionary p) |
Apply a property change.
|
void |
boot(boolean create,
java.util.Properties startParams) |
Start-up method for this instance of the language connection factory.
|
private static java.lang.Object |
bootServiceModule(boolean create,
java.lang.Object serviceModule,
java.lang.String factoryInterface,
java.util.Properties properties) |
Privileged startup.
|
boolean |
canSupport(java.util.Properties startParams) |
this implementation will not support caching of statements.
|
private static java.lang.Object |
findServiceModule(java.lang.Object serviceModule,
java.lang.String factoryInterface) |
Privileged startup.
|
private static java.lang.Object |
findSystemModule(java.lang.String factoryInterface) |
Privileged lookup.
|
ClassFactory |
getClassFactory() |
Get the ClassFactory to use with this language connection
|
DataValueFactory |
getDataValueFactory() |
Get the DataValueFactory to use with this language connection
|
ExecutionFactory |
getExecutionFactory() |
Get the ExecutionFactory to use with this language connection
|
JavaFactory |
getJavaFactory() |
Get the JavaFactory to use with this language connection
REMIND: this is only used by the compiler; should there be
a compiler module control class to boot compiler-only stuff?
|
(package private) static ModuleFactory |
getMonitor() |
Privileged Monitor lookup.
|
protected int |
getNextLCCInstanceNumber() |
Get the instance # for the next LCC.
|
OptimizerFactory |
getOptimizerFactory() |
Get the OptimizerFactory to use with this language connection
|
PropertyFactory |
getPropertyFactory() |
Get the PropertyFactory to use with this language connection
|
private static java.lang.Object |
getServiceModule(java.lang.Object serviceModule,
java.lang.String factoryInterface) |
Privileged module lookup.
|
Statement |
getStatement(SchemaDescriptor compilationSchema,
java.lang.String statementText,
boolean forReadOnly) |
Get a Statement for the connection
|
CacheManager |
getStatementCache() |
returns the statement cache that this connection should use; currently
there is a statement cache per database.
|
TypeCompilerFactory |
getTypeCompilerFactory() |
Get the TypeCompilerFactory to use with this language connection
|
UUIDFactory |
getUUIDFactory() |
Get the UUIDFactory to use with this language connection
REMIND: this is only used by the compiler; should there be
a compiler module control class to boot compiler-only stuff?
|
void |
init(boolean dbOnly,
java.util.Dictionary p) |
Initialize the properties for this callback.
|
java.io.Serializable |
map(java.lang.String key,
java.io.Serializable value,
java.util.Dictionary p) |
Map a proposed new value for a property to an official value.
|
Cacheable |
newCacheable(CacheManager cm) |
|
LanguageConnectionContext |
newLanguageConnectionContext(ContextManager cm,
TransactionController tc,
LanguageFactory lf,
Database db,
java.lang.String userName,
java.lang.String drdaID,
java.lang.String dbname) |
Get a LanguageConnectionContext. this holds things
we want to remember about activity in the language system,
where this factory holds things that are pretty stable,
like other factories.
|
Parser |
newParser(CompilerContext cc) |
|
protected void |
setValidation() |
|
private static java.lang.Object |
startSystemModule(java.lang.String factoryInterface) |
Privileged startup.
|
private int |
statementCacheSize(java.util.Properties startParams) |
|
void |
stop() |
Stop this module.
|
boolean |
validate(java.lang.String key,
java.io.Serializable value,
java.util.Dictionary p) |
Validate a property change.
|
private ExecutionFactory ef
private OptimizerFactory of
private TypeCompilerFactory tcf
private DataValueFactory dvf
private UUIDFactory uuidFactory
private JavaFactory javaFactory
private ClassFactory classFactory
private PropertyFactory pf
private int nextLCCInstanceNumber
private int cacheSize
private CacheManager singleStatementCache
public Statement getStatement(SchemaDescriptor compilationSchema, java.lang.String statementText, boolean forReadOnly)
getStatement
in interface LanguageConnectionFactory
compilationSchema
- schemastatementText
- the text for the statementforReadOnly
- if concurrency is CONCUR_READ_ONLYpublic LanguageConnectionContext newLanguageConnectionContext(ContextManager cm, TransactionController tc, LanguageFactory lf, Database db, java.lang.String userName, java.lang.String drdaID, java.lang.String dbname) throws StandardException
The returned LanguageConnectionContext is intended for use only by the connection that requested it.
newLanguageConnectionContext
in interface LanguageConnectionFactory
StandardException
- the usual -- for the subclasspublic Cacheable newCacheable(CacheManager cm)
newCacheable
in interface CacheableFactory
public UUIDFactory getUUIDFactory()
getUUIDFactory
in interface LanguageConnectionFactory
public ClassFactory getClassFactory()
getClassFactory
in interface LanguageConnectionFactory
public JavaFactory getJavaFactory()
getJavaFactory
in interface LanguageConnectionFactory
public ExecutionFactory getExecutionFactory()
getExecutionFactory
in interface LanguageConnectionFactory
public PropertyFactory getPropertyFactory()
getPropertyFactory
in interface LanguageConnectionFactory
public OptimizerFactory getOptimizerFactory()
getOptimizerFactory
in interface LanguageConnectionFactory
public TypeCompilerFactory getTypeCompilerFactory()
getTypeCompilerFactory
in interface LanguageConnectionFactory
public DataValueFactory getDataValueFactory()
getDataValueFactory
in interface LanguageConnectionFactory
public boolean canSupport(java.util.Properties startParams)
canSupport
in interface ModuleSupportable
private int statementCacheSize(java.util.Properties startParams)
public void boot(boolean create, java.util.Properties startParams) throws StandardException
boot
in interface ModuleControl
startParams
- The start-up parameters (ignored in this case)StandardException
- Thrown on failure to bootMonitor
,
ModuleFactory
public CacheManager getStatementCache()
getStatementCache
in interface LanguageConnectionFactory
public void stop()
stop
in interface ModuleControl
Monitor
,
ModuleFactory
public void init(boolean dbOnly, java.util.Dictionary p)
PropertySetCallback
Code within an init() method should use the 3 argument PropertyUtil method getPropertyFromSet() to obtain a property's value.
init
in interface PropertySetCallback
dbOnly
- true if only per-database properties are to be looked atp
- the complete set of per-database properties.public boolean validate(java.lang.String key, java.io.Serializable value, java.util.Dictionary p) throws StandardException
PropertySetCallback
validate
in interface PropertySetCallback
key
- Property key for the property being setvalue
- proposed new value for the property being set or null if
the property is being dropped.p
- Property set before the change. SettingProperty may read but
must never change p.StandardException
- Thrown on error.PropertySetCallback.validate(java.lang.String, java.io.Serializable, java.util.Dictionary)
public Serviceable apply(java.lang.String key, java.io.Serializable value, java.util.Dictionary p)
PropertySetCallback
apply
in interface PropertySetCallback
key
- Property key for the property being setvalue
- proposed new value for the property being set or null if
the property is being dropped.p
- Property set before the change. SettingProperty may read but
must never change p.PropertySetCallback.apply(java.lang.String, java.io.Serializable, java.util.Dictionary)
public java.io.Serializable map(java.lang.String key, java.io.Serializable value, java.util.Dictionary p)
PropertySetCallback
map
in interface PropertySetCallback
key
- Property key for the property being setvalue
- proposed new value for the property being set or null if
the property is being dropped.p
- Property set before the change. SettingProperty may read but
must never change p.PropertySetCallback.map(java.lang.String, java.io.Serializable, java.util.Dictionary)
protected void setValidation() throws StandardException
StandardException
public Parser newParser(CompilerContext cc)
newParser
in interface LanguageConnectionFactory
protected int getNextLCCInstanceNumber()
static ModuleFactory getMonitor()
private static java.lang.Object startSystemModule(java.lang.String factoryInterface) throws StandardException
StandardException
private static java.lang.Object findSystemModule(java.lang.String factoryInterface) throws StandardException
StandardException
private static java.lang.Object bootServiceModule(boolean create, java.lang.Object serviceModule, java.lang.String factoryInterface, java.util.Properties properties) throws StandardException
StandardException
private static java.lang.Object findServiceModule(java.lang.Object serviceModule, java.lang.String factoryInterface) throws StandardException
StandardException
private static java.lang.Object getServiceModule(java.lang.Object serviceModule, java.lang.String factoryInterface)
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.