Java Doc for Heap.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » impl » store » access » heap » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derby.impl.store.access.heap 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.iapi.types.DataType
      org.apache.derby.impl.store.access.conglomerate.GenericConglomerate
         org.apache.derby.impl.store.access.heap.Heap

Heap
final public class Heap extends GenericConglomerate implements Conglomerate,StaticCompiledOpenConglomInfo(Code)
A heap object corresponds to an instance of a heap conglomerate. It caches information which makes it fast to open heap controllers from it.


Field Summary
 int[]format_ids
     The format id's of each of the columns in the heap table.
protected  ContainerKeyid
    

Constructor Summary
public  Heap()
     Zero arg constructor for Monitor to create empty object.

Method Summary
public  voidaddColumn(TransactionManager xact_manager, int column_id, Storable template_column)
     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.

public  voidboot_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.

public  voidcompressConglomerate(TransactionManager xact_manager, Transaction rawtran)
    
protected  voidcreate(Transaction rawtran, int segmentId, long input_containerid, DataValueDescriptor[] template, Properties properties, int tmpFlag)
     Create a heap conglomerate.

Create a heap conglomerate.

public  ScanManagerdefragmentConglomerate(TransactionManager xact_manager, Transaction rawtran, boolean hold, int open_mode, int lock_level, LockingPolicy locking_policy, int isolation_level)
     Open a heap compress scan.
public  voiddrop(TransactionManager xact_manager)
     Drop this heap.
public  intestimateMemoryUsage()
    
public  booleanfetchMaxOnBTree(TransactionManager xact_manager, Transaction rawtran, long conglomId, int open_mode, int lock_level, LockingPolicy locking_policy, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] fetchRow)
     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.

public  DataValueDescriptorgetConglom()
     return the "Conglomerate".
final public  longgetContainerid()
    
public  DynamicCompiledOpenConglomInfogetDynamicCompiledConglomInfo(long conglomId)
     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.

final public  ContainerKeygetId()
     Get the id of the container of the conglomerate.

Will have to change when a conglomerate could have more than one container.

public  StaticCompiledOpenConglomInfogetStaticCompiledConglomInfo(TransactionController tc, long conglomId)
     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.

public  intgetTypeFormatId()
     Return my format identifier.
public  booleanisNull()
     Return whether the value is null or not.
public  booleanisTemporary()
    
public  longload(TransactionManager xact_manager, boolean createConglom, RowLocationRetRowSource rowSource)
     Bulk load into the conglomerate.
public  ConglomerateControlleropen(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.
public  ScanManageropenScan(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)
     Open a heap scan controller.
public  StoreCostControlleropenStoreCost(TransactionManager xact_manager, Transaction rawtran)
     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.


Parameters:
  xact_manager - The TransactionController under which this operation takes place.
Parameters:
  rawtran - raw transaction context in which scan is managed.

public  voidpurgeConglomerate(TransactionManager xact_manager, Transaction rawtran)
    
public  voidreadExternal(ObjectInput in)
     Restore the in-memory representation from the stream.
public  voidreadExternalFromArray(ArrayInputStream in)
    
public  voidrestoreToNull()
     Restore the in-memory representation to the null value.
public  StringtoString()
     Print this heap.
public  voidwriteExternal(ObjectOutput out)
     Store the stored representation of the column value in the stream.

Field Detail
format_ids
int[] format_ids(Code)
The format id's of each of the columns in the heap table.



id
protected ContainerKey id(Code)




Constructor Detail
Heap
public Heap()(Code)
Zero arg constructor for Monitor to create empty object.




Method Detail
addColumn
public void addColumn(TransactionManager xact_manager, int column_id, Storable template_column) throws StandardException(Code)
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.
Parameters:
  column_id - The column number to add this column at.
Parameters:
  template_column - An instance of the column to be added to table.
exception:
  StandardException - Standard exception policy.




boot_create
public void boot_create(long containerid, DataValueDescriptor[] template)(Code)
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.
Parameters:
  containerid - The container id of the conglomerate.
Parameters:
  template - Object array describing the columns of the heap.




compressConglomerate
public void compressConglomerate(TransactionManager xact_manager, Transaction rawtran) throws StandardException(Code)



create
protected void create(Transaction rawtran, int segmentId, long input_containerid, DataValueDescriptor[] template, Properties properties, int tmpFlag) throws StandardException(Code)
Create a heap conglomerate.

Create a heap conglomerate. This method is called from the heap factory to create a new instance of a heap.


exception:
  StandardException - Standard exception policy.




defragmentConglomerate
public ScanManager defragmentConglomerate(TransactionManager xact_manager, Transaction rawtran, boolean hold, int open_mode, int lock_level, LockingPolicy locking_policy, int isolation_level) throws StandardException(Code)
Open a heap compress scan.


See Also:   Conglomerate.defragmentConglomerate
exception:
  StandardException - Standard exception policy.




drop
public void drop(TransactionManager xact_manager) throws StandardException(Code)
Drop this heap.
See Also:   Conglomerate.drop
exception:
  StandardException - Standard exception policy.



estimateMemoryUsage
public int estimateMemoryUsage()(Code)



fetchMaxOnBTree
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(Code)
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.
Parameters:
  conglomId - The identifier of the conglomerateto open the scan for.
Parameters:
  open_mode - Specifiy flags to control opening of table. OPENMODE_FORUPDATE - if set open the table forupdate otherwise open table shared.
Parameters:
  lock_level - One of (MODE_TABLE, MODE_RECORD, or MODE_NONE).
Parameters:
  isolation_level - The isolation level to lock the conglomerate at.One of (ISOLATION_READ_COMMITTED or ISOLATION_SERIALIZABLE).
Parameters:
  scanColumnList - A description of which columns to return from every fetch in the scan. template, and scanColumnList work togetherto describe the row to be returned by the scan - see RowUtil for description of how these three parameters work together to describe a "row".
Parameters:
  fetchRow - The row to retrieve the maximum value into. boolean indicating if a row was found and retrieved or not.
exception:
  StandardException - Standard exception policy.




getConglom
public DataValueDescriptor getConglom()(Code)
return the "Conglomerate".

For heap just return "this", which both implements Conglomerate and StaticCompiledOpenConglomInfo.

this




getContainerid
final public long getContainerid()(Code)



getDynamicCompiledConglomInfo
public DynamicCompiledOpenConglomInfo getDynamicCompiledConglomInfo(long conglomId) throws StandardException(Code)
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, ...

The dynamic information.
Parameters:
  conglomId - The identifier of the conglomerate to open.
exception:
  StandardException - Standard exception policy.




getId
final public ContainerKey getId()(Code)
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. The ContainerKey.




getStaticCompiledConglomInfo
public StaticCompiledOpenConglomInfo getStaticCompiledConglomInfo(TransactionController tc, long conglomId) throws StandardException(Code)
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.

The static compiled information.
Parameters:
  conglomId - The identifier of the conglomerate to open.
exception:
  StandardException - Standard exception policy.




getTypeFormatId
public int getTypeFormatId()(Code)
Return my format identifier.
See Also:   org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId



isNull
public boolean isNull()(Code)
Return whether the value is null or not.
See Also:   org.apache.derby.iapi.services.io.Storable.isNull



isTemporary
public boolean isTemporary()(Code)
Is this conglomerate temporary?

whether conglomerate is temporary or not.




load
public long load(TransactionManager xact_manager, boolean createConglom, RowLocationRetRowSource rowSource) throws StandardException(Code)
Bulk load into the conglomerate.


See Also:   Conglomerate.load
exception:
  StandardException - Standard exception policy.




open
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(Code)
Open a heap controller.


See Also:   Conglomerate.open
exception:
  StandardException - Standard exception policy.




openScan
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(Code)
Open a heap scan controller.


See Also:   Conglomerate.openScan
exception:
  StandardException - Standard exception policy.




openStoreCost
public StoreCostController openStoreCost(TransactionManager xact_manager, Transaction rawtran) throws StandardException(Code)
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.


Parameters:
  xact_manager - The TransactionController under which this operation takes place.
Parameters:
  rawtran - raw transaction context in which scan is managed. The open StoreCostController.
exception:
  StandardException - Standard exception policy.
See Also:   StoreCostController




purgeConglomerate
public void purgeConglomerate(TransactionManager xact_manager, Transaction rawtran) throws StandardException(Code)



readExternal
public void readExternal(ObjectInput in) throws IOException(Code)
Restore the in-memory representation from the stream.
See Also:   java.io.Externalizable.readExternal



readExternalFromArray
public void readExternalFromArray(ArrayInputStream in) throws IOException(Code)



restoreToNull
public void restoreToNull()(Code)
Restore the in-memory representation to the null value.
See Also:   org.apache.derby.iapi.services.io.Storable.restoreToNull



toString
public String toString()(Code)
Print this heap.



writeExternal
public void writeExternal(ObjectOutput out) throws IOException(Code)
Store the stored representation of the column value in the stream.



Methods inherited from org.apache.derby.impl.store.access.conglomerate.GenericConglomerate
public int compare(DataValueDescriptor other) throws StandardException(Code)(Java Doc)
public DataValueDescriptor getClone()(Code)(Java Doc)
public int getLength() throws StandardException(Code)(Java Doc)
public DataValueDescriptor getNewNull()(Code)(Java Doc)
public Object getObject() throws StandardException(Code)(Java Doc)
public String getString() throws StandardException(Code)(Java Doc)
public String getTypeName()(Code)(Java Doc)
protected void setFrom(DataValueDescriptor theValue) throws StandardException(Code)(Java Doc)
public void setValueFromResultSet(ResultSet resultSet, int colNumber, boolean isNullable) throws StandardException, SQLException(Code)(Java Doc)

Methods inherited from org.apache.derby.iapi.types.DataType
public void checkHostVariable(int declaredLength) throws StandardException(Code)(Java Doc)
public Object cloneObject()(Code)(Java Doc)
public DataValueDescriptor coalesce(DataValueDescriptor[] argumentsList, DataValueDescriptor returnValue) throws StandardException(Code)(Java Doc)
public boolean compare(int op, DataValueDescriptor other, boolean orderedNulls, boolean unknownRV) throws StandardException(Code)(Java Doc)
final protected StandardException dataTypeConversion(String targetType)(Code)(Java Doc)
public BooleanDataValue equals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc)
public boolean equals(Object other)(Code)(Java Doc)
protected static int flip(int operator)(Code)(Java Doc)
public boolean getBoolean() throws StandardException(Code)(Java Doc)
public byte getByte() throws StandardException(Code)(Java Doc)
public byte[] getBytes() throws StandardException(Code)(Java Doc)
public Date getDate(Calendar cal) throws StandardException(Code)(Java Doc)
public double getDouble() throws StandardException(Code)(Java Doc)
public float getFloat() throws StandardException(Code)(Java Doc)
public int getInt() throws StandardException(Code)(Java Doc)
public long getLong() throws StandardException(Code)(Java Doc)
protected String getNationalString(LocaleFinder localeFinder) throws StandardException(Code)(Java Doc)
public Object getObject() throws StandardException(Code)(Java Doc)
public short getShort() throws StandardException(Code)(Java Doc)
public InputStream getStream() throws StandardException(Code)(Java Doc)
public Time getTime(Calendar cal) throws StandardException(Code)(Java Doc)
public Timestamp getTimestamp(Calendar cal) throws StandardException(Code)(Java Doc)
public String getTraceString() throws StandardException(Code)(Java Doc)
public BooleanDataValue greaterOrEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc)
public BooleanDataValue greaterThan(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc)
public BooleanDataValue in(DataValueDescriptor left, DataValueDescriptor[] inList, boolean orderedList) throws StandardException(Code)(Java Doc)
final protected StandardException invalidFormat()(Code)(Java Doc)
final public BooleanDataValue isNotNull()(Code)(Java Doc)
final public BooleanDataValue isNullOp()(Code)(Java Doc)
public BooleanDataValue lessOrEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc)
public BooleanDataValue lessThan(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc)
public void normalize(DataTypeDescriptor desiredType, DataValueDescriptor source) throws StandardException(Code)(Java Doc)
public BooleanDataValue notEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc)
final protected StandardException outOfRange()(Code)(Java Doc)
public void setBigDecimal(Number bigDecimal) throws StandardException(Code)(Java Doc)
protected void setFrom(DataValueDescriptor dvd) throws StandardException(Code)(Java Doc)
public void setInto(PreparedStatement ps, int position) throws SQLException, StandardException(Code)(Java Doc)
public void setInto(ResultSet rs, int position) throws SQLException, StandardException(Code)(Java Doc)
public void setObjectForCast(Object theValue, boolean instanceOfResultType, String resultTypeClassName) throws StandardException(Code)(Java Doc)
public void setToNull()(Code)(Java Doc)
public void setValue(Time theValue) throws StandardException(Code)(Java Doc)
public void setValue(Time theValue, Calendar cal) throws StandardException(Code)(Java Doc)
public void setValue(Timestamp theValue) throws StandardException(Code)(Java Doc)
public void setValue(Timestamp theValue, Calendar cal) throws StandardException(Code)(Java Doc)
public void setValue(Date theValue) throws StandardException(Code)(Java Doc)
public void setValue(Date theValue, Calendar cal) throws StandardException(Code)(Java Doc)
public void setValue(String theValue) throws StandardException(Code)(Java Doc)
public void setValue(int theValue) throws StandardException(Code)(Java Doc)
public void setValue(double theValue) throws StandardException(Code)(Java Doc)
public void setValue(float theValue) throws StandardException(Code)(Java Doc)
public void setValue(short theValue) throws StandardException(Code)(Java Doc)
public void setValue(long theValue) throws StandardException(Code)(Java Doc)
public void setValue(byte theValue) throws StandardException(Code)(Java Doc)
public void setValue(boolean theValue) throws StandardException(Code)(Java Doc)
public void setValue(byte[] theValue) throws StandardException(Code)(Java Doc)
final public void setValue(DataValueDescriptor dvd) throws StandardException(Code)(Java Doc)
public void setValue(InputStream theStream, int valueLength) throws StandardException(Code)(Java Doc)
public void throwLangSetMismatch(Object value) throws StandardException(Code)(Java Doc)
public int typePrecedence()(Code)(Java Doc)
public int typeToBigDecimal() throws StandardException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

w_w__w___.___j___a___v__a___2__s__.___c___o___m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.