public class GenericExecutionFactory extends java.lang.Object implements ModuleControl, ModuleSupportable, ExecutionFactory
Modifier and Type | Field and Description |
---|---|
private GenericConstantActionFactory |
genericConstantActionFactory |
private ResultSetFactory |
rsFactory |
private ResultSetStatisticsFactory |
rssFactory
Statistics factory for this factory.
|
private XPLAINFactoryIF |
xplainFactory |
MODULE
Constructor and Description |
---|
GenericExecutionFactory() |
Modifier and Type | Method and Description |
---|---|
void |
boot(boolean create,
java.util.Properties startParams)
This Factory is expected to be booted relative to a
LanguageConnectionFactory.
|
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)
See if this implementation can support any attributes that are listed in properties.
|
GenericConstantActionFactory |
getConstantActionFactory()
Get the factory for constant actions.
|
ExecIndexRow |
getIndexableRow(ExecRow valueRow)
This returns the value row as an indexable row
|
ExecIndexRow |
getIndexableRow(int numColumns)
This returns an indexable row
|
Qualifier |
getQualifier(int columnId,
int operator,
GeneratedMethod orderableGetter,
Activation activation,
boolean orderedNulls,
boolean unknownRV,
boolean negateCompareResult,
int variantType)
Get a Qualifier to use with a scan of a conglomerate.
|
ResultColumnDescriptor |
getResultColumnDescriptor(ResultColumnDescriptor compileRCD)
Create an execution time ResultColumnDescriptor from a
compile time RCD.
|
ResultDescription |
getResultDescription(ResultColumnDescriptor[] columns,
java.lang.String statementType)
Make a result description
|
ResultSetFactory |
getResultSetFactory()
Factories are generic and can be used by all connections.
|
ResultSetStatisticsFactory |
getResultSetStatisticsFactory()
Get the ResultSetStatisticsFactory from this ExecutionFactory.
|
RowChanger |
getRowChanger(long heapConglom,
StaticCompiledOpenConglomInfo heapSCOCI,
DynamicCompiledOpenConglomInfo heapDCOCI,
IndexRowGenerator[] irgs,
long[] indexCIDS,
StaticCompiledOpenConglomInfo[] indexSCOCIs,
DynamicCompiledOpenConglomInfo[] indexDCOCIs,
int numberOfColumns,
TransactionController tc,
int[] changedColumnIds,
FormatableBitSet baseRowReadList,
int[] baseRowReadMap,
int[] streamStorableColIds,
Activation activation)
Create a new RowChanger for doing insert update and delete
operations based on partial before and after.
|
RowChanger |
getRowChanger(long heapConglom,
StaticCompiledOpenConglomInfo heapSCOCI,
DynamicCompiledOpenConglomInfo heapDCOCI,
IndexRowGenerator[] irgs,
long[] indexCIDS,
StaticCompiledOpenConglomInfo[] indexSCOCIs,
DynamicCompiledOpenConglomInfo[] indexDCOCIs,
int numberOfColumns,
TransactionController tc,
int[] changedColumnIds,
int[] streamStorableHeapColIds,
Activation activation)
Create a new RowChanger for performing update and delete
operations based on full before and after rows.
|
ScanQualifier[][] |
getScanQualifier(int numQualifiers)
Get an array of ScanQualifiers for a scan.
|
(package private) InternalTriggerExecutionContext |
getTriggerExecutionContext(LanguageConnectionContext lcc,
ConnectionContext cc,
java.lang.String statementText,
int dmlType,
UUID targetTableId,
java.lang.String targetTableName,
java.util.Vector<AutoincrementCounter> aiCounters)
Get a trigger execution context
|
ExecRow |
getValueRow(int numColumns)
This returns a new row that is storable but not indexable
|
XPLAINFactoryIF |
getXPLAINFactory()
Get the XPLAINFactory from this ExecutionContext.
|
ExecutionContext |
newExecutionContext(ContextManager cm)
We want a dependency context so that we can push it onto
the stack.
|
void |
releaseScanQualifier(ScanQualifier[][] qualifiers)
Release a ScanQualifier[] (back to the pool or free it).
|
void |
stop()
Stop the module.
|
private ResultSetStatisticsFactory rssFactory
private ResultSetFactory rsFactory
private GenericConstantActionFactory genericConstantActionFactory
private XPLAINFactoryIF xplainFactory
public boolean canSupport(java.util.Properties startParams)
ModuleSupportable
The module can check for attributes in the properties to
see if it can fulfill the required behaviour. E.g. the raw
store may define an attribute called RawStore.Recoverable.
If a temporary raw store is required the property RawStore.recoverable=false
would be added to the properties before calling bootServiceModule. If a
raw store cannot support this attribute its canSupport method would
return null. Also see the Monitor class's prologue to see how the
identifier is used in looking up properties.
Actually a better way maybe to have properties of the form
RawStore.Attributes.mandatory=recoverable,smallfootprint and
RawStore.Attributes.requested=oltp,fast
canSupport
in interface ModuleSupportable
public void boot(boolean create, java.util.Properties startParams) throws StandardException
boot
in interface ModuleControl
StandardException
- Thrown on errorLanguageConnectionFactory
public void stop()
ModuleControl
stop
in interface ModuleControl
Monitor
,
ModuleFactory
public ResultSetFactory getResultSetFactory()
getResultSetFactory
in interface ExecutionFactory
public GenericConstantActionFactory getConstantActionFactory()
public ResultSetStatisticsFactory getResultSetStatisticsFactory() throws StandardException
getResultSetStatisticsFactory
in interface ExecutionFactory
StandardException
- Thrown on errorpublic ExecutionContext newExecutionContext(ContextManager cm)
newExecutionContext
in interface ExecutionFactory
cm
- the context managerpublic ScanQualifier[][] getScanQualifier(int numQualifiers)
ExecutionFactory
getScanQualifier
in interface ExecutionFactory
numQualifiers
- The number of ScanQualifiers to get.public ResultDescription getResultDescription(ResultColumnDescriptor[] columns, java.lang.String statementType)
getResultDescription
in interface ExecutionFactory
public ResultColumnDescriptor getResultColumnDescriptor(ResultColumnDescriptor compileRCD)
getResultColumnDescriptor
in interface ExecutionFactory
compileRCD
- The compile time RCD.public void releaseScanQualifier(ScanQualifier[][] qualifiers)
ExecutionFactory
releaseScanQualifier
in interface ExecutionFactory
ExecutionFactory.releaseScanQualifier(org.apache.derby.iapi.sql.execute.ScanQualifier[][])
public Qualifier getQualifier(int columnId, int operator, GeneratedMethod orderableGetter, Activation activation, boolean orderedNulls, boolean unknownRV, boolean negateCompareResult, int variantType)
ExecutionFactory
getQualifier
in interface ExecutionFactory
columnId
- The store id of the column to qualifyoperator
- One of Orderable.ORDER_OP_EQUALS,
Orderable.ORDER_OP_LESSTHAN,
or Orderable.ORDER_OP_LESSOREQUALSorderableGetter
- A generated method that returns the
Orderable to be compared with the columnactivation
- The Activation that acts as the receiver for the
generated methodorderedNulls
- True means that null == null for the sake of
this QualifierunknownRV
- The value to return if the comparison between
the column and the Orderable value returns the
unknown truth valuenegateCompareResult
- True means to negate the result of the comparison.
So, for example, to do a > comparison, you would
pass ORDER_OP_LESSOREQUALS and set negate to true.variantType
- The variantType for the qualifier's orderable.
(Determines whether or not to cache the value.)ExecutionFactory.getQualifier(int, int, org.apache.derby.iapi.services.loader.GeneratedMethod, org.apache.derby.iapi.sql.Activation, boolean, boolean, boolean, int)
public RowChanger getRowChanger(long heapConglom, StaticCompiledOpenConglomInfo heapSCOCI, DynamicCompiledOpenConglomInfo heapDCOCI, IndexRowGenerator[] irgs, long[] indexCIDS, StaticCompiledOpenConglomInfo[] indexSCOCIs, DynamicCompiledOpenConglomInfo[] indexDCOCIs, int numberOfColumns, TransactionController tc, int[] changedColumnIds, int[] streamStorableHeapColIds, Activation activation) throws StandardException
ExecutionFactory
getRowChanger
in interface ExecutionFactory
heapConglom
- Conglomerate # for the heapheapSCOCI
- The SCOCI for the heap.heapDCOCI
- The DCOCI for the heap.irgs
- the IndexRowGenerators for the table's indexes. We use
positions in this array as local id's for indexes. To support updates,
only indexes that change need be included.indexCIDS
- the conglomerateids for the table's idexes.
indexCIDS[ix] corresponds to the same index as irgs[ix].indexSCOCIs
- the SCOCIs for the table's idexes.
indexSCOCIs[ix] corresponds to the same index as irgs[ix].indexDCOCIs
- the DCOCIs for the table's idexes.
indexDCOCIs[ix] corresponds to the same index as irgs[ix].numberOfColumns
- Number of columns in a full row.tc
- the transaction controllerstreamStorableHeapColIds
- Column ids of stream storable
columns. (0 based, Only needed for sync. null if none or
not needed).activation
- The Activation.StandardException
- Thrown on errorExecutionFactory.getRowChanger(long, org.apache.derby.iapi.store.access.StaticCompiledOpenConglomInfo, org.apache.derby.iapi.store.access.DynamicCompiledOpenConglomInfo, org.apache.derby.iapi.sql.dictionary.IndexRowGenerator[], long[], org.apache.derby.iapi.store.access.StaticCompiledOpenConglomInfo[], org.apache.derby.iapi.store.access.DynamicCompiledOpenConglomInfo[], int, org.apache.derby.iapi.store.access.TransactionController, int[], int[], org.apache.derby.iapi.sql.Activation)
public RowChanger getRowChanger(long heapConglom, StaticCompiledOpenConglomInfo heapSCOCI, DynamicCompiledOpenConglomInfo heapDCOCI, IndexRowGenerator[] irgs, long[] indexCIDS, StaticCompiledOpenConglomInfo[] indexSCOCIs, DynamicCompiledOpenConglomInfo[] indexDCOCIs, int numberOfColumns, TransactionController tc, int[] changedColumnIds, FormatableBitSet baseRowReadList, int[] baseRowReadMap, int[] streamStorableColIds, Activation activation) throws StandardException
ExecutionFactory
getRowChanger
in interface ExecutionFactory
heapConglom
- Conglomerate # for the heapheapSCOCI
- The SCOCI for the heap.heapDCOCI
- The DCOCI for the heap.irgs
- the IndexRowGenerators for the table's indexes. We use
positions in this array as local id's for indexes. To support updates,
only indexes that change need be included.indexCIDS
- the conglomerateids for the table's idexes.
indexCIDS[ix] corresponds to the same index as irgs[ix].indexSCOCIs
- the SCOCIs for the table's idexes.
indexSCOCIs[ix] corresponds to the same index as irgs[ix].indexDCOCIs
- the DCOCIs for the table's idexes.
indexDCOCIs[ix] corresponds to the same index as irgs[ix].numberOfColumns
- Number of columns in partial row.tc
- the transaction controllerchangedColumnIds
- array of 1 based ints of columns
to be updated. Used by update only.baseRowReadList
- the columns in the base row that were
read (1 based)baseRowReadMap
- baseRowReadMap[heapColId]->readRowColId
(0 based)streamStorableColIds
- Column ids of stream storable
columns. (0 based, Only needed for sync. null if none or
not needed).activation
- The Activation.StandardException
- Thrown on errorExecutionFactory.getRowChanger(long, org.apache.derby.iapi.store.access.StaticCompiledOpenConglomInfo, org.apache.derby.iapi.store.access.DynamicCompiledOpenConglomInfo, org.apache.derby.iapi.sql.dictionary.IndexRowGenerator[], long[], org.apache.derby.iapi.store.access.StaticCompiledOpenConglomInfo[], org.apache.derby.iapi.store.access.DynamicCompiledOpenConglomInfo[], int, org.apache.derby.iapi.store.access.TransactionController, int[], int[], org.apache.derby.iapi.sql.Activation)
InternalTriggerExecutionContext getTriggerExecutionContext(LanguageConnectionContext lcc, ConnectionContext cc, java.lang.String statementText, int dmlType, UUID targetTableId, java.lang.String targetTableName, java.util.Vector<AutoincrementCounter> aiCounters) throws StandardException
StandardException
- Thrown on errorpublic ExecRow getValueRow(int numColumns)
ExecutionFactory
getValueRow
in interface ExecutionFactory
public ExecIndexRow getIndexableRow(int numColumns)
ExecutionFactory
getIndexableRow
in interface ExecutionFactory
public ExecIndexRow getIndexableRow(ExecRow valueRow)
ExecutionFactory
getIndexableRow
in interface ExecutionFactory
public XPLAINFactoryIF getXPLAINFactory() throws StandardException
getXPLAINFactory
in interface ExecutionFactory
StandardException
- Thrown on errorprivate static java.lang.Object bootServiceModule(boolean create, java.lang.Object serviceModule, java.lang.String factoryInterface, java.util.Properties properties) throws StandardException
StandardException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.