|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.iapi.types.DataType
org.apache.derby.impl.store.access.conglomerate.GenericConglomerate
org.apache.derby.impl.store.access.heap.Heap
org.apache.derby.impl.store.access.heap.Heap_v10_2
public class Heap_v10_2
Format ID | ACCESS_HEAP_V2_ID |
Purpose | The tag that describes the on disk representation of the Heap conglomerate object. Access contains no "directory" of conglomerate information. In order to bootstrap opening a file it encodes the factory that can open the conglomerate in the conglomerate id itself. There exists a single HeapFactory which must be able to read all heap format id's. This format was used for all Derby database Heap's in version 10.2 and previous versions. |
Upgrade | The format id of this object is currently always read from disk as the first field of the conglomerate itself. A bootstrap problem exists as we don't know the format id of the heap until we are in the "middle" of reading the Heap. Thus the base Heap implementation must be able to read and write all formats based on the reading the "format_of_this_conglomerate". soft upgrade to ACCESS_HEAP_V3_ID: read: old format is readable by current Heap implementation, with automatic in memory creation of default collation id needed by new format. No code other than readExternal and writeExternal need know about old format. write: will never write out new format id in soft upgrade mode. Code in readExternal and writeExternal handles writing correct version. Code in the factory handles making sure new conglomerates use the Heap_v10_2 class that will write out old format info. hard upgrade to ACCESS_HEAP_V3_ID: read: old format is readable by current Heap implementation, with automatic in memory creation of default collation id needed by new format. write: Only "lazy" upgrade will happen. New format will only get written for new conglomerate created after the upgrade. Old conglomerates continue to be handled the same as soft upgrade. |
Disk Layout | format_of_this_conlgomerate(byte[]) containerid(long) segmentid(int) number_of_columns(int) array_of_format_ids(byte[][]) |
Field Summary |
---|
Fields inherited from class org.apache.derby.impl.store.access.heap.Heap |
---|
collation_ids, conglom_format_id, format_ids |
Fields inherited from interface org.apache.derby.iapi.types.DataValueDescriptor |
---|
UNKNOWN_LOGICAL_LENGTH |
Fields inherited from interface org.apache.derby.iapi.types.Orderable |
---|
ORDER_OP_EQUALS, ORDER_OP_GREATEROREQUALS, ORDER_OP_GREATERTHAN, ORDER_OP_LESSOREQUALS, ORDER_OP_LESSTHAN |
Constructor Summary | |
---|---|
Heap_v10_2()
No arg constructor, required by Formatable. |
Method Summary | |
---|---|
int |
getTypeFormatId()
Return my format identifier. |
void |
writeExternal(java.io.ObjectOutput out)
Store the stored representation of the column value in the stream. |
Methods inherited from class org.apache.derby.impl.store.access.heap.Heap |
---|
addColumn, boot_create, compressConglomerate, create, defragmentConglomerate, drop, estimateMemoryUsage, fetchMaxOnBTree, getConglom, getContainerid, getDynamicCompiledConglomInfo, getId, getStaticCompiledConglomInfo, isNull, isTemporary, load, open, openScan, openStoreCost, purgeConglomerate, readExternal, readExternalFromArray, restoreToNull, toString, writeExternal_v10_2 |
Methods inherited from class org.apache.derby.impl.store.access.conglomerate.GenericConglomerate |
---|
cloneValue, compare, getLength, getNewNull, getObject, getString, getTypeName, setFrom, setValueFromResultSet |
Methods inherited from class org.apache.derby.iapi.types.DataType |
---|
checkHostVariable, cloneHolder, coalesce, compare, compare, compare, compareTo, dataTypeConversion, equals, equals, flip, getBoolean, getByte, getBytes, getDate, getDouble, getFloat, getInt, getLong, getNationalString, getShort, getStream, getTime, getTimestamp, getTraceString, greaterOrEquals, greaterThan, hasStream, in, invalidFormat, isNotNull, isNullOp, lessOrEquals, lessThan, normalize, notEquals, outOfRange, recycle, setBigDecimal, setInto, setInto, setObjectForCast, setToNull, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, throwLangSetMismatch, typePrecedence, typeToBigDecimal |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.derby.iapi.types.DataValueDescriptor |
---|
checkHostVariable, cloneHolder, cloneValue, coalesce, compare, compare, compare, compare, equals, getBoolean, getByte, getBytes, getDate, getDouble, getFloat, getInt, getLength, getLong, getNewNull, getObject, getShort, getStream, getString, getTime, getTimestamp, getTraceString, getTypeName, greaterOrEquals, greaterThan, hasStream, in, isNotNull, isNullOp, lessOrEquals, lessThan, normalize, notEquals, recycle, setBigDecimal, setInto, setInto, setObjectForCast, setToNull, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueFromResultSet, typePrecedence, typeToBigDecimal |
Constructor Detail |
---|
public Heap_v10_2()
Method Detail |
---|
public int getTypeFormatId()
This identifier was used for Heap in all Derby versions prior to 10.3. Databases hard upgraded to a version 10.3 and later will write the new format, see Heap. Databases created in 10.3 and later will also write the new format, see Heap.
getTypeFormatId
in interface TypedFormat
getTypeFormatId
in class Heap
TypedFormat.getTypeFormatId()
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
For more detailed description of the format see documentation at top of file.
writeExternal
in interface java.io.Externalizable
writeExternal
in class Heap
java.io.IOException
Externalizable.writeExternal(java.io.ObjectOutput)
|
Built on Thu 2011-03-10 11:54:14+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |