| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| protected int[] | collation_ids
The array of collation id's for each column in the template. |
| protected int | conglom_format_id
Format id of the conglomerate. |
| private static final int | |
| pack-priv int[] | format_ids
The format id's of each of the columns in the heap table. |
| private boolean | hasCollatedTypes
Tells if there is at least one column in the conglomerate whose collation isn't StringDataValue.COLLATION_TYPE_UCS_BASIC. |
| private ContainerKey |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addColumn(TransactionManager
The TransactionController under which this
operation takes place. xact_manager, int The column number to add this column at. column_id, Storable An instance of the column to be added to table. template_column, int Collation id of the column added. collation_id)Implements org. Add a column to the heap conglomerate. |
| public void | boot_create(long
The container id of the conglomerate. containerid, DataValueDescriptor[] Object array describing the columns of the heap. template)Create a heap conglomerate during the boot process. |
| public void | compressConglomerate(TransactionManager xact_manager, Transaction rawtran)
Implements org.
|
| protected void | create(Transaction rawtran, int segmentId, long input_containerid, DataValueDescriptor[] template, ColumnOrdering[] columnOrder, int[] collationIds, Properties properties, int conglom_format_id, int tmpFlag)
Create a heap conglomerate. |
| public ScanManager | defragmentConglomerate(TransactionManager xact_manager, Transaction rawtran, boolean
see openScan() hold, int see openScan() open_mode, int see openScan() lock_level, LockingPolicy locking_policy, int see openScan() isolation_level)Implements org. Open a heap compress scan. |
| public void | drop(TransactionManager xact_manager)
Implements org. Drop this heap. |
| public int | estimateMemoryUsage()
Implements org. Estimate the memory usage in bytes of the data value and the overhead of the class. |
| public boolean | Returns: boolean indicating if a row was found and retrieved or not.The TransactionController under which this
operation takes place. xact_manager, Transaction The raw store xact to associate all ops with. rawtran, long The identifier of the conglomerate
to open the scan for. conglomId, int Specifiy flags to control opening of table.
OPENMODE_FORUPDATE - if set open the table for
update otherwise open table shared. open_mode, int One of (MODE_TABLE, MODE_RECORD, or MODE_NONE). lock_level, LockingPolicy The LockingPolicy to use to open the conglomerate. locking_policy, int The isolation level to lock the conglomerate at.
One of (ISOLATION_READ_COMMITTED or
ISOLATION_SERIALIZABLE). isolation_level, FormatableBitSet A description of which columns to return from
every fetch in the scan. template,
and scanColumnList work together
to describe the row to be returned by the scan -
see RowUtil for description of how these three
parameters work together to describe a "row". scanColumnList, DataValueDescriptor[] The row to retrieve the maximum value into. fetchRow)Implements org. Retrieve the maximum value row in an ordered conglomerate. |
| public DataValueDescriptor | Returns: thisImplements org. return the "Conglomerate". |
| public final long | getContainerid()
Implements org. Get the containerid of conglomerate. |
| public DynamicCompiledOpenConglomInfo | Returns: The dynamic information.Implements org. Return dynamic information about the conglomerate to be dynamically reused in repeated execution of a statement. |
| public final ContainerKey | Returns: The ContainerKey.Implements org. Get the id of the container of the conglomerate. |
| public StaticCompiledOpenConglomInfo | Returns: The static compiled information.The TransactionController under which this operation
takes place. tc, long The identifier of the conglomerate to open. conglomId)Implements org. Return static information about the conglomerate to be included in a a compiled plan. |
| public int | getTypeFormatId()
Implements org. Return my format identifier. |
| public boolean | isNull()
Implements org. Return whether the value is null or not. |
| public boolean | Returns: whether conglomerate is temporary or not.Implements org. Is this conglomerate temporary? |
| public long | load(TransactionManager
The TransactionController under which this operation
takes place. xact_manager, boolean If true, the conglomerate is being created in the
same operation as the openAndLoadConglomerate.
The enables further optimization as recovery does
not require page allocation to be logged. createConglom, RowLocationRetRowSource Where the rows come from. rowSource)Implements org. Bulk load into the conglomerate. |
| public ConglomerateController | open(TransactionManager
The access xact to associate all ops on cc with. xact_manager, Transaction The raw store xact to associate all ops on cc with. rawtran, boolean hold, int A bit mask of TransactionController.MODE_* bits,
indicating info about the open. open_mode, int Either TransactionController.MODE_TABLE or
TransactionController.MODE_RECORD, as passed into
the openConglomerate() call. lock_level, LockingPolicy The LockingPolicy to use to open the conglomerate. locking_policy, StaticCompiledOpenConglomInfo static_info, DynamicCompiledOpenConglomInfo dynamic_info)Implements org. Open a heap controller. |
| pack-priv static ConglomerateController | openByContainerKey(ContainerKey container_key, TransactionManager xact_manager, Transaction rawtran, boolean hold, int open_mode, int lock_level, LockingPolicy locking_policy, StaticCompiledOpenConglomInfo static_info, DynamicCompiledOpenConglomInfo dynamic_info)
Open a heap controller given ContainerKey. |
| public ScanManager | openScan(TransactionManager xact_manager, Transaction rawtran, boolean hold, int open_mode, int lock_level, LockingPolicy locking_policy, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier[][] qualifier, DataValueDescriptor[] stopKeyValue, int stopSearchOperator, StaticCompiledOpenConglomInfo static_info, DynamicCompiledOpenConglomInfo dynamic_info)
Implements org. Open a heap scan controller. |
| public StoreCostController | Returns: The open StoreCostController.The TransactionController under which this
operation takes place. xact_manager, Transaction raw transaction context in which scan is managed. rawtran)Implements org. Return an open StoreCostController for the conglomerate. |
| public void | purgeConglomerate(TransactionManager xact_manager, Transaction rawtran)
Implements org.
|
| public void | readExternal(ObjectInput
the stream to read data from in order to restore the object in)Implements java. Restore the in-memory representation from the stream. |
| public void | restoreToNull()
Implements org. Restore the in-memory representation to the null value. |
| public String | |
| public void | writeExternal(ObjectOutput
the stream to write the object to out)Implements java. Store the stored representation of column value in stream. |
| protected void | writeExternal_v10_2(ObjectOutput out)
Store the 10.2 format stored representation of column value in stream. |
| BASE_MEMORY_USAGE | back to summary |
|---|---|
| private static final int BASE_MEMORY_USAGE | |
| collation_ids | back to summary |
|---|---|
| protected int[] collation_ids The array of collation id's for each column in the template. | |
| conglom_format_id | back to summary |
|---|---|
| protected int conglom_format_id Format id of the conglomerate. | |
| CONTAINER_KEY_MEMORY_USAGE | back to summary |
|---|---|
| private static final int CONTAINER_KEY_MEMORY_USAGE | |
| format_ids | back to summary |
|---|---|
| pack-priv int[] format_ids The format id's of each of the columns in the heap table. | |
| hasCollatedTypes | back to summary |
|---|---|
| private boolean hasCollatedTypes Tells if there is at least one column in the conglomerate whose collation isn't StringDataValue.COLLATION_TYPE_UCS_BASIC. | |
| id | back to summary |
|---|---|
| private ContainerKey id | |
| Heap | back to summary |
|---|---|
| public Heap() Zero arg constructor for Monitor to create empty object. | |
| addColumn | back to summary |
|---|---|
| public void addColumn(TransactionManager xact_manager, int column_id, Storable template_column, int collation_id) throws StandardException Implements org. Add a column to the heap conglomerate. This routine update's the in-memory object version of the Heap Conglomerate to have one more column of the type described by the input template column.
| |
| boot_create | back to summary |
|---|---|
| public void boot_create(long containerid, DataValueDescriptor[] template) Create a heap conglomerate during the boot process. Manufacture a Heap Conglomerate out of "thin" air, to boot strap the system. Create an in-memory Heap Conglomerate with the input parameters, The caller will use this to open the conglomerate conglomerate and read the "real" values from disk. Conglom-conglom is always on segment 0.
| |
| compressConglomerate | back to summary |
|---|---|
| public void compressConglomerate(TransactionManager xact_manager, Transaction rawtran) throws StandardException Implements org. | |
| create | back to summary |
|---|---|
| protected void create(Transaction rawtran, int segmentId, long input_containerid, DataValueDescriptor[] template, ColumnOrdering[] columnOrder, int[] collationIds, Properties properties, int conglom_format_id, int tmpFlag) throws StandardException Create a heap conglomerate. Create a heap conglomerate. This method is called from the heap factory to create a new instance of a heap.
| |
| drop | back to summary |
|---|---|
| public void drop(TransactionManager xact_manager) throws StandardException Implements org. Drop this heap.
| |
| estimateMemoryUsage | back to summary |
|---|---|
| public int estimateMemoryUsage() Implements org. Doc from org. Estimate the memory usage in bytes of the data value and the overhead of the class.
| |
| fetchMaxOnBTree | back to summary |
|---|---|
| public boolean fetchMaxOnBTree(TransactionManager xact_manager, Transaction rawtran, long conglomId, int open_mode, int lock_level, LockingPolicy locking_policy, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] fetchRow) throws StandardException Implements org. Retrieve the maximum value row in an ordered conglomerate. Returns true and fetches the rightmost row of an ordered conglomerate into "fetchRow" if there is at least one row in the conglomerate. If there are no rows in the conglomerate it returns false. Non-ordered conglomerates will not implement this interface, calls will generate a StandardException. RESOLVE - this interface is temporary, long term equivalent (and more) functionality will be provided by the openBackwardScan() interface.
| |
| getConglom | back to summary |
|---|---|
| public DataValueDescriptor getConglom() Implements org. return the "Conglomerate". For heap just return "this", which both implements Conglomerate and StaticCompiledOpenConglomInfo.
| |
| getContainerid | back to summary |
|---|---|
| public final long getContainerid() Implements org. Doc from org. Get the containerid of conglomerate. Will have to change when a conglomerate could have more than one containerid.
| |
| getDynamicCompiledConglomInfo | back to summary |
|---|---|
| public DynamicCompiledOpenConglomInfo getDynamicCompiledConglomInfo() throws StandardException Implements org. Return dynamic information about the conglomerate to be dynamically reused in repeated execution of a statement. The dynamic info is a set of variables to be used in a given ScanController or ConglomerateController. It can only be used in one controller at a time. It is up to the caller to insure the correct thread access to this info. The type of info in this is a scratch template for btree traversal, other scratch variables for qualifier evaluation, ...
| |
| getId | back to summary |
|---|---|
| public final ContainerKey getId() Implements org. Get the id of the container of the conglomerate. Will have to change when a conglomerate could have more than one container. The ContainerKey is a combination of the container id and segment id.
| |
| getStaticCompiledConglomInfo | back to summary |
|---|---|
| public StaticCompiledOpenConglomInfo getStaticCompiledConglomInfo(TransactionController tc, long conglomId) throws StandardException Implements org. Return static information about the conglomerate to be included in a a compiled plan. The static info would be valid until any ddl was executed on the conglomid, and would be up to the caller to throw away when that happened. This ties in with what language already does for other invalidation of static info. The type of info in this would be containerid and array of format id's from which templates can be created. The info in this object is read only and can be shared among as many threads as necessary.
| |
| getTypeFormatId | back to summary |
|---|---|
| public int getTypeFormatId() Implements org. Return my format identifier.
| |
| isNull | back to summary |
|---|---|
| public boolean isNull() Implements org. Return whether the value is null or not.
| |
| isTemporary | back to summary |
|---|---|
| public boolean isTemporary() Implements org. Is this conglomerate temporary?
| |
| load | back to summary |
|---|---|
| public long load(TransactionManager xact_manager, boolean createConglom, RowLocationRetRowSource rowSource) throws StandardException Implements org. Bulk load into the conglomerate.
| |
| open | back to summary |
|---|---|
| public ConglomerateController open(TransactionManager xact_manager, Transaction rawtran, boolean hold, int open_mode, int lock_level, LockingPolicy locking_policy, StaticCompiledOpenConglomInfo static_info, DynamicCompiledOpenConglomInfo dynamic_info) throws StandardException Implements org. Open a heap controller.
| |
| openByContainerKey | back to summary |
|---|---|
| pack-priv static ConglomerateController openByContainerKey(ContainerKey container_key, TransactionManager xact_manager, Transaction rawtran, boolean hold, int open_mode, int lock_level, LockingPolicy locking_policy, StaticCompiledOpenConglomInfo static_info, DynamicCompiledOpenConglomInfo dynamic_info) throws StandardException Open a heap controller given ContainerKey. Static routine to open a container given input of the ContainerKey. Routine will lock the container first, and then get the Heap from the conglomerate cache. This insures that interaction with the conglomerate cache is safe with respect to concurrent alter table's which may or may not commit. Currently only package accessible and only used by HeapPostCommit. Longer term would be better to change all of the open interfaces to get lock before accessing conglomerate cache rather than have a specific interface for HeapPostCommit.
| |
| openScan | back to summary |
|---|---|
| public ScanManager openScan(TransactionManager xact_manager, Transaction rawtran, boolean hold, int open_mode, int lock_level, LockingPolicy locking_policy, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier[][] qualifier, DataValueDescriptor[] stopKeyValue, int stopSearchOperator, StaticCompiledOpenConglomInfo static_info, DynamicCompiledOpenConglomInfo dynamic_info) throws StandardException Implements org. Open a heap scan controller.
| |
| openStoreCost | back to summary |
|---|---|
| public StoreCostController openStoreCost(TransactionManager xact_manager, Transaction rawtran) throws StandardException Implements org. Return an open StoreCostController for the conglomerate. Return an open StoreCostController which can be used to ask about the estimated row counts and costs of ScanController and ConglomerateController operations, on the given conglomerate.
| |
| purgeConglomerate | back to summary |
|---|---|
| public void purgeConglomerate(TransactionManager xact_manager, Transaction rawtran) throws StandardException Implements org. | |
| readExternal | back to summary |
|---|---|
| public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException Implements java. Restore the in-memory representation from the stream.
| |
| restoreToNull | back to summary |
|---|---|
| public void restoreToNull() Implements org. Restore the in-memory representation to the null value. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Print this heap.
| |
| writeExternal | back to summary |
|---|---|
| public void writeExternal(ObjectOutput out) throws IOException Implements java. Store the stored representation of column value in stream. This routine uses the current database version to either store the the 10.2 format (ACCESS_HEAP_V2_ID) or the current format (ACCESS_HEAP_V3_ID).
| |
| writeExternal_v10_2 | back to summary |
|---|---|
| protected void writeExternal_v10_2(ObjectOutput out) throws IOException Store the 10.2 format stored representation of column value in stream. This routine stores the 10.2 version the Heap, ie. the ACCESS_HEAP_V2_ID format. It is used by any database which has been created in 10.2 or a previous release and has not been hard upgraded to a version subsequent to 10.2.
| |