Java Doc for ConglomerateController.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » store » access » 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.iapi.store.access 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.derby.iapi.store.access.ConglomerateController

All known Subclasses:   org.apache.derby.impl.store.access.heap.HeapController,  org.apache.derby.impl.store.access.btree.BTreeController,  org.apache.derby.impl.store.access.conglomerate.GenericConglomerateController,
ConglomerateController
public interface ConglomerateController extends ConglomPropertyQueryable(Code)
A conglomerate is an abstract storage structure (they correspond to access methods). The ConglomerateController interface is the interface that access manager clients can use to manipulate the contents of the underlying conglomerate.

Each conglomerate holds a set of rows. Each row has a row location. The conglomerate provides methods for:

  • Inserting rows,
  • Fetching, deleting, and replacing entire rows by row location, and
  • fetching and updating individual columns of a row identified by row location.

Conglomerates do not provide any mechanism for associative access to rows within the conglomerate; this type of access is provided by scans via the ScanController interface.

Although all conglomerates have the same interface, they have different implementations. The implementation of a conglomerate determines some of its user-visible semantics; for example whether the rows are ordered or what the types of the rows' columns must be. The implementation is specified by an implementation id. Currently there are two implementations, "heap", and "btree". The details of their behavior are specified in their implementation documentation. (Currently, only "heap" is implemented).

All conglomerate operations are subject to the transactional isolation of the transaction they were opened from. Transaction rollback will close all conglomerates. Transaction commit will close all non-held conglomerates.

Scans are opened from a TransactionController.

A ConglomerateController can handle partial rows. Partial rows are described in RowUtil.
See Also:   TransactionController.openConglomerate
See Also:   RowUtil



Field Summary
final public static  intLOCK_INS
    
final public static  intLOCK_INS_PREVKEY
    
final public static  intLOCK_READ
    
final public static  intLOCK_UPD
    
final public static  intLOCK_UPDATE_LOCKS
    
final public static  intROWISDUPLICATE
    


Method Summary
 voidcheckConsistency()
     Check consistency of a conglomerate. Checks the consistency of the data within a given conglomerate, does not check consistency external to the conglomerate (ie.
public  voidclose()
     Close the conglomerate controller.

Close the conglomerate controller.

 booleancloseForEndTransaction(boolean closeHeldScan)
     Close conglomerate controller as part of terminating a transaction.

Use this call to close the conglomerate controller resources as part of committing or aborting a transaction.

 voiddebugConglomerate()
     Dump debugging output to error log.
 booleandelete(RowLocation loc)
     Delete a row from the conglomerate.
 booleanfetch(RowLocation loc, DataValueDescriptor[] destRow, FormatableBitSet validColumns)
     Fetch the (partial) row at the given location.


Parameters:
  loc - The "RowLocation" which describes the exact rowto fetch from the table.
Parameters:
  destRow - The row to read the data into.
Parameters:
  validColumns - A description of which columns to return fromrow on the page into "destRow." destRowand validColumns work together todescribe the row to be returned by the fetch - see RowUtil for description of how these three parameters work together to describe a fetched "row".

 booleanfetch(RowLocation loc, DataValueDescriptor[] destRow, FormatableBitSet validColumns, boolean waitForLock)
     Fetch the (partial) row at the given location.


Parameters:
  loc - The "RowLocation" which describes the exact rowto fetch from the table.
Parameters:
  destRow - The row to read the data into.
Parameters:
  validColumns - A description of which columns to return fromrow on the page into "destRow." destRowand validColumns work together todescribe the row to be returned by the fetch - see RowUtil for description of how these three parameters work together to describe a fetched "row".
Parameters:
  waitForLock - If false, then the call will throw a lock timeoutexception immediately, if the lock can not begranted without waiting.

 SpaceInfogetSpaceInfo()
     Get information about space used by the conglomerate.
 intinsert(DataValueDescriptor[] row)
     Insert a row into the conglomerate.
Parameters:
  row - The row to insert into the conglomerate.
 voidinsertAndFetchLocation(DataValueDescriptor[] row, RowLocation destRowLocation)
     insert row and fetch it's row location in one operation.

Insert a row into the conglomerate, and store its location in the provided destination row location.

 booleanisKeyed()
     Return whether this is a keyed conglomerate.
 booleanlockRow(RowLocation loc, int lock_oper, boolean wait, int lock_duration)
     Lock the given row location.
 booleanlockRow(long page_num, int record_id, int lock_oper, boolean wait, int lock_duration)
     Lock the given record id/page num pair.
 RowLocationnewRowLocationTemplate()
     Return a row location object of the correct type to be used in calls to insertAndFetchLocation.
 booleanreplace(RowLocation loc, DataValueDescriptor[] row, FormatableBitSet validColumns)
     Replace the (partial) row at the given location.
public  voidunlockRowAfterRead(RowLocation loc, boolean forUpdate, boolean row_qualified)
     UnLock the given row location.

Field Detail
LOCK_INS
final public static int LOCK_INS(Code)



LOCK_INS_PREVKEY
final public static int LOCK_INS_PREVKEY(Code)



LOCK_READ
final public static int LOCK_READ(Code)



LOCK_UPD
final public static int LOCK_UPD(Code)



LOCK_UPDATE_LOCKS
final public static int LOCK_UPDATE_LOCKS(Code)



ROWISDUPLICATE
final public static int ROWISDUPLICATE(Code)





Method Detail
checkConsistency
void checkConsistency() throws StandardException(Code)
Check consistency of a conglomerate. Checks the consistency of the data within a given conglomerate, does not check consistency external to the conglomerate (ie. does not check that base table row pointed at by a secondary index actually exists). Raises a StandardException on first consistency problem.
exception:
  StandardException - Standard exception policy.



close
public void close() throws StandardException(Code)
Close the conglomerate controller.

Close the conglomerate controller. Callers must not use the conglomerate controller after calling close. It is strongly recommended that callers clear out the reference after closing, e.g.,

 ConglomerateController cc;
 cc.close;
 cc = null;
 

exception:
  StandardException - Standard exception policy.



closeForEndTransaction
boolean closeForEndTransaction(boolean closeHeldScan) throws StandardException(Code)
Close conglomerate controller as part of terminating a transaction.

Use this call to close the conglomerate controller resources as part of committing or aborting a transaction. The normal close() routine may do some cleanup that is either unnecessary, or not correct due to the unknown condition of the controller following a transaction ending error. Use this call when closing all controllers as part of an abort of a transaction. RESOLVE (mikem) - move this call to ConglomerateManager so it is obvious that non-access clients should not call this.
Parameters:
  closeHeldScan - If true, means to close controller even ifit has been opened to be kept opened across commit. This isused to close these controllers on abort. boolean indicating that the close has resulted in a real closeof the controller. A held scan will return false if called by closeForEndTransaction(false), otherwise it will return true. A non-held scan will always return true.
exception:
  StandardException - Standard exception policy.




debugConglomerate
void debugConglomerate() throws StandardException(Code)
Dump debugging output to error log.

Dump information about the conglomerate to error log. This is only for debugging purposes, does nothing in a delivered system, currently.
exception:
  StandardException - Standard exception policy.




delete
boolean delete(RowLocation loc) throws StandardException(Code)
Delete a row from the conglomerate. Returns true if delete was successful, false if the record pointedat no longer represents a valid record.
exception:
  StandardException - Standard exception policy.



fetch
boolean fetch(RowLocation loc, DataValueDescriptor[] destRow, FormatableBitSet validColumns) throws StandardException(Code)
Fetch the (partial) row at the given location.


Parameters:
  loc - The "RowLocation" which describes the exact rowto fetch from the table.
Parameters:
  destRow - The row to read the data into.
Parameters:
  validColumns - A description of which columns to return fromrow on the page into "destRow." destRowand validColumns work together todescribe the row to be returned by the fetch - see RowUtil for description of how these three parameters work together to describe a fetched "row". Returns true if fetch was successful, false if the record pointed at no longer represents a valid record.
exception:
  StandardException - Standard exception policy.
See Also:   RowUtil




fetch
boolean fetch(RowLocation loc, DataValueDescriptor[] destRow, FormatableBitSet validColumns, boolean waitForLock) throws StandardException(Code)
Fetch the (partial) row at the given location.


Parameters:
  loc - The "RowLocation" which describes the exact rowto fetch from the table.
Parameters:
  destRow - The row to read the data into.
Parameters:
  validColumns - A description of which columns to return fromrow on the page into "destRow." destRowand validColumns work together todescribe the row to be returned by the fetch - see RowUtil for description of how these three parameters work together to describe a fetched "row".
Parameters:
  waitForLock - If false, then the call will throw a lock timeoutexception immediately, if the lock can not begranted without waiting. If true call will act exactly as fetch() interface with no waitForLock parameter. Returns true if fetch was successful, false if the record pointed at no longer represents a valid record.
exception:
  StandardException - Standard exception policy.
See Also:   RowUtil




getSpaceInfo
SpaceInfo getSpaceInfo() throws StandardException(Code)
Get information about space used by the conglomerate.



insert
int insert(DataValueDescriptor[] row) throws StandardException(Code)
Insert a row into the conglomerate.
Parameters:
  row - The row to insert into the conglomerate. The storedrepresentations of the row's columns are copied into a new rowsomewhere in the conglomerate. Returns 0 if insert succeeded. Returns ConglomerateController.ROWISDUPLICATE if conglomerate supports uniquenesschecks and has been created to disallow duplicates, and the row insertedhad key columns which were duplicate of a row already in the table. Otherinsert failures will raise StandardException's.
exception:
  StandardException - Standard exception policy.
See Also:   RowUtil



insertAndFetchLocation
void insertAndFetchLocation(DataValueDescriptor[] row, RowLocation destRowLocation) throws StandardException(Code)
insert row and fetch it's row location in one operation.

Insert a row into the conglomerate, and store its location in the provided destination row location. The row location must be of the correct type for this conglomerate (a new row location of the correct type can be obtained from newRowLocationTemplate()).
Parameters:
  row - The row to insert into the conglomerate. The stored representations of the row's columns are copied into a new row somewhere in the conglomerate.
Parameters:
  destRowLocation - The rowlocation to read the inserted row locationinto.
exception:
  StandardException - Standard exception policy.
See Also:   RowUtil




isKeyed
boolean isKeyed()(Code)
Return whether this is a keyed conglomerate.



lockRow
boolean lockRow(RowLocation loc, int lock_oper, boolean wait, int lock_duration) throws StandardException(Code)
Lock the given row location.

Should only be called by access.

This call can be made on a ConglomerateController that was opened for locking only.

RESOLVE (mikem) - move this call to ConglomerateManager so it is obvious that non-access clients should not call this. true if lock was granted, only can be false if wait was false.
Parameters:
  loc - The "RowLocation" of the exact row to lock.
Parameters:
  lock_oper - For what operation are we requesting the lock, thisshould be one of the following 4 options:LOCK_READ [read lock], (LOCK_INS | LOCK_UPD) [ lock for insert], (LOCK_INSERT_PREVKEY | LOCK_UPD) [lock for previous key to insert],(LOCK_UPD) [lock for delete or replace](LOCK_UPD | LOCK_UPDATE_LOCKS) [lock scan for update, will upgrade lock later if actual updateis take place]
Parameters:
  wait - Should the lock call wait to be granted?
Parameters:
  lock_duration - If set to TransactionManager.LOCK_INSTANT_DURATION,then lock will be released immediately after beinggranted.
exception:
  StandardException - Standard exception policy.




lockRow
boolean lockRow(long page_num, int record_id, int lock_oper, boolean wait, int lock_duration) throws StandardException(Code)
Lock the given record id/page num pair.

Should only be called by access, to lock "special" locks formed from the Recordhandle.* reserved constants for page specific locks.

This call can be made on a ConglomerateController that was opened for locking only.

RESOLVE (mikem) - move this call to ConglomerateManager so it is obvious that non-access clients should not call this. true if lock was granted, only can be false if wait was false.
Parameters:
  page_num - page number of record to lock.
Parameters:
  record_id - record id of record to lock.
Parameters:
  lock_oper - For what operation are we requesting the lock, thisshould be one of the following 4 options:LOCK_READ [read lock], (LOCK_INS | LOCK_UPD) [ lock for insert], (LOCK_INSERT_PREVKEY | LOCK_UPD) [lock for previous key to insert],(LOCK_UPD) [lock for delete or replace](LOCK_UPD | LOCK_UPDATE_LOCKS) [lock scan for update, will upgrade lock later if actual updateis take place]
Parameters:
  wait - Should the lock call wait to be granted?
Parameters:
  lock_duration - If set to TransactionManager.LOCK_INSTANT_DURATION,then lock will be released immediately after beinggranted.
exception:
  StandardException - Standard exception policy.




newRowLocationTemplate
RowLocation newRowLocationTemplate() throws StandardException(Code)
Return a row location object of the correct type to be used in calls to insertAndFetchLocation.
exception:
  StandardException - Standard exception policy.



replace
boolean replace(RowLocation loc, DataValueDescriptor[] row, FormatableBitSet validColumns) throws StandardException(Code)
Replace the (partial) row at the given location. true if update was successful, returns false if the update fails because the record pointed at no longer represents a valid record.
exception:
  StandardException - Standard exception policy.
See Also:   RowUtil



unlockRowAfterRead
public void unlockRowAfterRead(RowLocation loc, boolean forUpdate, boolean row_qualified) throws StandardException(Code)
UnLock the given row location.

Should only be called by access.

This call can be made on a ConglomerateController that was opened for locking only.

RESOLVE (mikem) - move this call to ConglomerateManager so it is obvious that non-access clients should not call this.
Parameters:
  loc - The "RowLocation" which describes the row to unlock.
Parameters:
  forUpdate - Row was locked for read or update.
Parameters:
  row_qualified - Row was qualified and returned to the user.
exception:
  StandardException - Standard exception policy.




www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.