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


java.lang.Object
   org.apache.derby.impl.store.access.conglomerate.OpenConglomerate

All known Subclasses:   org.apache.derby.impl.store.access.heap.OpenHeap,
OpenConglomerate
abstract public class OpenConglomerate (Code)
A Generic class which implements the basic functionality needed to operate on an "open" conglomerate. This class assumes the following general things about the access method.

The access method is page based and contained in a single container maintained by raw store.





Method Summary
public  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 container.
public  voiddebugConglomerate()
    
final public  ConglomerategetConglomerate()
    
final public  ContainerHandlegetContainer()
    
abstract public  int[]getFormatIds()
    
final public  booleangetHold()
    
public  PropertiesgetInternalTablePropertySet(Properties prop)
     Request set of properties associated with a table.
final public  intgetOpenMode()
    
final public  TransactiongetRawTran()
    
final public  OpenConglomerateScratchSpacegetRuntimeMem()
    
public  SpaceInfogetSpaceInfo()
     Get information about space used by the conglomerate.
public  voidgetTableProperties(Properties prop)
     Request the system properties associated with a table.
final public  TransactionManagergetXactMgr()
    
public  ContainerHandleinit(ContainerHandle open_container, Conglomerate conglomerate, int[] format_ids, TransactionManager xact_manager, Transaction rawtran, boolean hold, int openmode, int lock_level, LockingPolicy locking_policy, DynamicCompiledOpenConglomInfo dynamic_info)
     Open the container.

Open the container, obtaining necessary locks.

final public  booleanisClosed()
    
final public  booleanisForUpdate()
    
protected  booleanisKeyed()
    
protected  booleanisTableLocked()
    
final public  booleanisUseUpdateLocks()
    
public  booleanlatchPage(RowPosition pos)
     Latch the page containing the current RowPosition.

This implementation also automatically updates the RowPosition to point at the slot containing the current RowPosition.

public  booleanlatchPageAndRepositionScan(RowPosition pos)
     Latch the page containing the current RowPosition, and reposition scan.

Upon return the scan will hold a latch on the page to continue the scan on.

public  booleanlockPositionForRead(RowPosition pos, RowPosition aux_pos, boolean moveForwardIfRowDisappears, boolean waitForLock)
     Lock row at given row position for read.

This routine requests a row lock NOWAIT on the row located at the given RowPosition.

public  booleanlockPositionForWrite(RowPosition pos, boolean forInsert, boolean waitForLock)
    
abstract protected  RowLocationnewRowLocationTemplate()
     Return an "empty" row location object of the correct type.
public  ContainerHandlereopen()
     Open the container.

Open the container, obtaining necessary locks.

public  voidunlockPositionAfterRead(RowPosition pos)
     Unlock the record after a previous request to lock it.

Unlock the record after a previous call to lockRecordForRead().




Method Detail
checkConsistency
public 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).

There is no checking in the default implementation, you must override to get conglomerate specific consistency checking.
exception:
  StandardException - Standard exception policy.




close
public void close() throws StandardException(Code)
Close the container.

Handles being closed more than once.
exception:
  StandardException - Standard exception policy.




debugConglomerate
public void debugConglomerate() throws StandardException(Code)



getConglomerate
final public Conglomerate getConglomerate()(Code)



getContainer
final public ContainerHandle getContainer()(Code)



getFormatIds
abstract public int[] getFormatIds()(Code)



getHold
final public boolean getHold()(Code)



getInternalTablePropertySet
public Properties getInternalTablePropertySet(Properties prop) throws StandardException(Code)
Request set of properties associated with a table.

Returns a property object containing all properties that the store knows about, which are stored persistently by the store. This set of properties may vary from implementation to implementation of the store.

This call is meant to be used only for internal query of the properties by jbms, for instance by language during bulk insert so that it can create a new conglomerate which exactly matches the properties that the original container was created with. This call should not be used by the user interface to present properties to users as it may contain properties that are meant to be internal to jbms. Some properties are meant only to be specified by jbms code and not by users on the command line.

Note that not all properties passed into createConglomerate() are stored persistently, and that set may vary by store implementation.
Parameters:
  prop - Property list to add properties to. If null, routine willcreate a new Properties object, fill it in and return it.
exception:
  StandardException - Standard exception policy.




getOpenMode
final public int getOpenMode()(Code)



getRawTran
final public Transaction getRawTran()(Code)



getRuntimeMem
final public OpenConglomerateScratchSpace getRuntimeMem()(Code)



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



getTableProperties
public void getTableProperties(Properties prop) throws StandardException(Code)
Request the system properties associated with a table.

Request the value of properties that are associated with a table. The following properties can be requested: derby.storage.pageSize derby.storage.pageReservedSpace derby.storage.minimumRecordSize derby.storage.initialPages

To get the value of a particular property add it to the property list, and on return the value of the property will be set to it's current value. For example: get_prop(ConglomerateController cc) { Properties prop = new Properties(); prop.put("derby.storage.pageSize", ""); cc.getTableProperties(prop); System.out.println( "table's page size = " + prop.getProperty("derby.storage.pageSize"); }
Parameters:
  prop - Property list to fill in.
exception:
  StandardException - Standard exception policy.




getXactMgr
final public TransactionManager getXactMgr()(Code)
Public Accessors of This class:



init
public ContainerHandle init(ContainerHandle open_container, Conglomerate conglomerate, int[] format_ids, TransactionManager xact_manager, Transaction rawtran, boolean hold, int openmode, int lock_level, LockingPolicy locking_policy, DynamicCompiledOpenConglomInfo dynamic_info) throws StandardException(Code)
Open the container.

Open the container, obtaining necessary locks. Most work is actually done by RawStore.openContainer().
exception:
  StandardException - Standard exception policy.




isClosed
final public boolean isClosed()(Code)



isForUpdate
final public boolean isForUpdate()(Code)



isKeyed
protected boolean isKeyed()(Code)



isTableLocked
protected boolean isTableLocked()(Code)
is the open btree table locked?



isUseUpdateLocks
final public boolean isUseUpdateLocks()(Code)



latchPage
public boolean latchPage(RowPosition pos) throws StandardException(Code)
Latch the page containing the current RowPosition.

This implementation also automatically updates the RowPosition to point at the slot containing the current RowPosition. This slot value is only valid while the latch is held.
exception:
  StandardException - Standard exception policy.




latchPageAndRepositionScan
public boolean latchPageAndRepositionScan(RowPosition pos) throws StandardException(Code)
Latch the page containing the current RowPosition, and reposition scan.

Upon return the scan will hold a latch on the page to continue the scan on. The scan will positioned on the record, just before the next record to return. Note that for both hold cursor and read uncommitted support this routine handles all cases of either the current position "dissappearing" (either the row and/or page). The row and/or page can disappear by deleted space being reclaimed post commit of that delete, and for some reason the code requesting the reposition does not have locks which prevented the space reclamation. Both hold cursor and read uncommitted scans are examples of ways the caller will not prevent space reclamation from claiming the position. This implementation also automatically updates the RowPosition to point at the slot containing the current RowPosition. This slot value is only valid while the latch is held. true if scan had to reposition because a row disappeared.
exception:
  StandardException - Standard exception policy.




lockPositionForRead
public boolean lockPositionForRead(RowPosition pos, RowPosition aux_pos, boolean moveForwardIfRowDisappears, boolean waitForLock) throws StandardException(Code)
Lock row at given row position for read.

This routine requests a row lock NOWAIT on the row located at the given RowPosition. If the lock is granted NOWAIT the routine will return true. If the lock cannot be granted NOWAIT, then the routine will release the latch on "page" and then it will request a WAIT lock on the row.

This implementation: Assumes latch held on current_page. If the current_rh field of RowPosition is non-null it is assumed that we want to lock that record handle and that we don't have a slot number. If the current_rh field of RowPosition is null, it is assumed the we want to lock the indicated current_slot. Upon return current_rh will point to the record handle associated with current_slot.

After waiting and getting the lock on the row, this routine will fix up RowPosition to point at the row locked. This means it will get the page latch again, and it will fix the current_slot to point at the waited for record handle - it may have moved while waiting on the lock.
Parameters:
  pos - Position to lock.
Parameters:
  aux_pos - If you have to give up latch to get lock, then also unlock this position if it is non-null.
Parameters:
  moveForwardIfRowDisappears - If true, then this routine must handle the case wherethe row id we are waiting on disappears when the latchis released. If false an exception will be thrown ifthe row disappears.
Parameters:
  waitForLock - if true wait for lock, if lock can't be granted NOWAIT,else if false, throw a lock timeout exception if thelock can't be granted without waiting. true if lock granted without releasing the latch, else returnfalse.
exception:
  StandardException - Standard exception policy.




lockPositionForWrite
public boolean lockPositionForWrite(RowPosition pos, boolean forInsert, boolean waitForLock) throws StandardException(Code)



newRowLocationTemplate
abstract protected RowLocation newRowLocationTemplate() throws StandardException(Code)
Return an "empty" row location object of the correct type.

The empty Rowlocation.
exception:
  StandardException - Standard exception policy.




reopen
public ContainerHandle reopen() throws StandardException(Code)
Open the container.

Open the container, obtaining necessary locks. Most work is actually done by RawStore.openContainer(). Will only reopen() if the container is not already open.
exception:
  StandardException - Standard exception policy.




unlockPositionAfterRead
public void unlockPositionAfterRead(RowPosition pos) throws StandardException(Code)
Unlock the record after a previous request to lock it.

Unlock the record after a previous call to lockRecordForRead(). It is expected that RowPosition contains information used to lock the record, Thus it is important if using a single RowPosition to track a scan to call unlock before you move the position forward to the next record.

Note that this routine assumes that the row was locked forUpdate if the OpenConglomerate is forUpdate, else it assumes the record was locked for read.
exception:
  StandardException - Standard exception policy.




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__av__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.