public class NodeFactoryImpl extends NodeFactory implements ModuleControl, ModuleSupportable
Modifier and Type | Field and Description |
---|---|
private java.lang.Boolean |
joinOrderOptimization |
private ClassInfo[] |
nodeCi |
MODULE
Constructor and Description |
---|
NodeFactoryImpl()
Every Module needs a public niladic constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
boot(boolean create,
java.util.Properties startParams)
Boot this module with the given properties.
|
boolean |
canSupport(java.util.Properties startParams)
Module supports the standard database engine and
a storeless SQL engine.
|
java.lang.Boolean |
doJoinOrderOptimization()
Tell whether to do join order optimization.
|
Node |
getNode(int nodeType,
ContextManager cm)
Get a node that takes no initializer arguments.
|
protected java.lang.String |
nodeName(int nodeType)
Translate a node type from C_NodeTypes to a class name
|
void |
stop()
Stop the module.
|
private java.lang.Boolean joinOrderOptimization
private final ClassInfo[] nodeCi
public NodeFactoryImpl()
public boolean canSupport(java.util.Properties startParams)
canSupport
in interface ModuleSupportable
public void boot(boolean create, java.util.Properties startParams) throws StandardException
ModuleControl
An implementation's boot method can throw StandardException. If it is thrown the module is not registered by the monitor and therefore cannot be found through a findModule(). In this case the module's stop() method is not called, thus throwing this exception must free up any resources.
When create is true the contents of the properties object
will be written to the service.properties of the persistent
service. Thus any code that requires an entry in service.properties
must explicitly place the value in this properties set
using the put method.
Typically the properties object contains one or more default
properties sets, which are not written out to service.properties.
These default sets are how callers modify the create process. In a
JDBC connection database create the first set of defaults is a properties
object that contains the attributes that were set on the jdbc:derby: URL.
This attributes properties set has the second default properties set as
its default. This set (which could be null) contains the properties
that the user set on their DriverManager.getConnection() call, and are thus
not owned by Derby code, and thus must not be modified by Derby
code.
When create is false the properties object contains all the properties set in the service.properties file plus a limited number of attributes from the JDBC URL attributes or connection properties set. This avoids properties set by the user compromising the boot process. An example of a property passed in from the JDBC world is the bootPassword for encrypted databases.
Code should not hold onto the passed in properties reference after boot time as its contents may change underneath it. At least after the complete boot is completed, the links to all the default sets will be removed.
boot
in interface ModuleControl
StandardException
- OoopsMonitor
public void stop()
ModuleControl
stop
in interface ModuleControl
Monitor
public java.lang.Boolean doJoinOrderOptimization()
NodeFactory
doJoinOrderOptimization
in class NodeFactory
NodeFactory.doJoinOrderOptimization()
public Node getNode(int nodeType, ContextManager cm) throws StandardException
NodeFactory
getNode
in class NodeFactory
nodeType
- Identifier for the type of node.cm
- A ContextManagerStandardException
- Thrown on errorNodeFactory.getNode(int, org.apache.derby.iapi.services.context.ContextManager)
protected java.lang.String nodeName(int nodeType) throws StandardException
nodeType
- A node type identifier from C_NodeTypesStandardException
- Thrown on errorApache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.