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


java.lang.Object
   org.apache.derby.impl.store.access.RAMAccessManager

All known Subclasses:   org.apache.derby.impl.store.access.RllRAMAccessManager,
RAMAccessManager
abstract public class RAMAccessManager implements AccessFactory,CacheableFactory,ModuleControl,PropertySetCallback(Code)


Field Summary
protected  ConglomerateFactoryconglom_map
     A map of the implementation specific id to conglomerate object.

A map of the implementation specific id to conglomerate object. The id is encoded into the conglomerate number, and then used to pick the right implementation of the conglomerate.

protected  LockingPolicyrecord_level_policy
    
 LockingPolicysystem_default_locking_policy
     Default locking policy for the entire system.
protected  LockingPolicytable_level_policy
    

Constructor Summary
public  RAMAccessManager()
    

Method Summary
public  Serviceableapply(String key, Serializable value, Dictionary p)
    
public  voidbackup(String backupDir, boolean wait)
    
public  voidbackupAndEnableLogArchiveMode(String backupDir, boolean deleteOnlineArchivedLogFiles, boolean wait)
    
public  voidboot(boolean create, Properties startParams)
    
abstract protected  voidbootLookupSystemLockLevel(TransactionController tc)
     Query property system to get the System lock level.

This routine will be called during boot after access has booted far enough, to allow access to the property conglomerate.

public  voidcheckpoint()
    
 voidconglomCacheAddEntry(long conglomid, Conglomerate conglom)
     Add a newly created conglomerate to the cache.
 ConglomerateconglomCacheFind(TransactionManager xact_mgr, long conglomid)
     Find a conglomerate by conglomid in the cache.

Look for a conglomerate given a conglomid.

protected  voidconglomCacheInvalidate()
     Invalide the current Conglomerate Cache.

Abort of certain operations will invalidate the contents of the cache.

 voidconglomCacheRemoveEntry(long conglomid)
     Remove an entry from the cache.
 voidconglomCacheUpdateEntry(long conglomid, Conglomerate new_conglom)
     Update a conglomerate directory entry.

Update the Conglom column of the Conglomerate Directory.

public  voidcreateFinished()
     Database creation finished.
public  voiddisableLogArchiveMode(boolean deleteOnlineArchivedLogFiles)
    
public  MethodFactoryfindMethodFactoryByFormat(UUID format)
     Find an access method that implements a format type.
public  MethodFactoryfindMethodFactoryByImpl(String impltype)
     Find an access method that implements an implementation type.
public  voidfreeze()
    
public  TransactionControllergetAndNameTransaction(ContextManager cm, String transName)
    
protected  LockingPolicygetDefaultLockingPolicy()
     Return the default locking policy for this access manager.
public  LockFactorygetLockFactory()
    
protected  longgetNextConglomId(int factory_type)
     Return next conglomid to try to add the container with.

The conglomerate number has 2 parts.

 RawStoreFactorygetRawStore()
    
abstract protected  intgetSystemLockLevel()
     Return the locking level of the system.

This routine controls the lowest level of locking enabled for all locks for all tables accessed through this accessmanager.

public  TransactionControllergetTransaction(ContextManager cm)
    
public  TransactionInfo[]getTransactionInfo()
    
 PropertyConglomerategetTransactionalProperties()
    
public  ObjectgetXAResourceManager()
     Return the XAResourceManager associated with this AccessFactory.
public  voidinit(boolean dbOnly, Dictionary p)
    
public  booleanisReadOnly()
    
public  Serializablemap(String key, Serializable value, Dictionary p)
    
public  CacheablenewCacheable(CacheManager cm)
    
public  voidregisterAccessMethod(MethodFactory factory)
    
public  ObjectstartXATransaction(ContextManager cm, int format_id, byte[] global_id, byte[] branch_id)
     Start a global transaction.

Get a transaction controller with which to manipulate data within the access manager.

public  voidstop()
    
public  voidunfreeze()
    
public  booleanvalidate(String key, Serializable value, Dictionary p)
    
public  voidwaitForPostCommitToFinishWork()
    

Field Detail
conglom_map
protected ConglomerateFactory conglom_map(Code)
A map of the implementation specific id to conglomerate object.

A map of the implementation specific id to conglomerate object. The id is encoded into the conglomerate number, and then used to pick the right implementation of the conglomerate. It is then up to the conglomerate implementation to retrieve it's stored representation from disk. An internal mapping of the encoding of conglomerate identity in the conglomerate number to the actual conglomerate implementation. Encoding this means that we can't dynamically add conglomerate implementations into the system, so when we want to do that this mapping will have to be more dynamic - but for now store knows exactly what implementations there are.




record_level_policy
protected LockingPolicy record_level_policy(Code)



system_default_locking_policy
LockingPolicy system_default_locking_policy(Code)
Default locking policy for the entire system.



table_level_policy
protected LockingPolicy table_level_policy(Code)




Constructor Detail
RAMAccessManager
public RAMAccessManager()(Code)
Constructors for This class:




Method Detail
apply
public Serviceable apply(String key, Serializable value, Dictionary p) throws StandardException(Code)



backup
public void backup(String backupDir, boolean wait) throws StandardException(Code)



backupAndEnableLogArchiveMode
public void backupAndEnableLogArchiveMode(String backupDir, boolean deleteOnlineArchivedLogFiles, boolean wait) throws StandardException(Code)



boot
public void boot(boolean create, Properties startParams) throws StandardException(Code)
Public Methods implementing ModuleControl Interface:



bootLookupSystemLockLevel
abstract protected void bootLookupSystemLockLevel(TransactionController tc) throws StandardException(Code)
Query property system to get the System lock level.

This routine will be called during boot after access has booted far enough, to allow access to the property conglomerate. This routine will call the property system and set the value to be returned by getSystemLockLevel().


exception:
  StandardException - Standard exception policy.




checkpoint
public void checkpoint() throws StandardException(Code)



conglomCacheAddEntry
void conglomCacheAddEntry(long conglomid, Conglomerate conglom) throws StandardException(Code)
Add a newly created conglomerate to the cache.


Parameters:
  conglomid - The conglomid of conglomerate to replace.
Parameters:
  conglom - The Conglom to add.
exception:
  StandardException - Standard exception policy.




conglomCacheFind
Conglomerate conglomCacheFind(TransactionManager xact_mgr, long conglomid) throws StandardException(Code)
Find a conglomerate by conglomid in the cache.

Look for a conglomerate given a conglomid. If in cache return it, otherwise fault in an entry by asking the owning factory to produce an entry.

The conglomerate object identified by "conglomid".
Parameters:
  conglomid - The conglomerate id of the conglomerate to look up.
exception:
  StandardException - Standard exception policy.




conglomCacheInvalidate
protected void conglomCacheInvalidate() throws StandardException(Code)
Invalide the current Conglomerate Cache.

Abort of certain operations will invalidate the contents of the cache. Longer term we could just invalidate those entries, but for now just invalidate the whole cache.


exception:
  StandardException - Standard exception policy.




conglomCacheRemoveEntry
void conglomCacheRemoveEntry(long conglomid) throws StandardException(Code)
Remove an entry from the cache.


Parameters:
  conglomid - The conglomid of conglomerate to replace.
exception:
  StandardException - Standard exception policy.




conglomCacheUpdateEntry
void conglomCacheUpdateEntry(long conglomid, Conglomerate new_conglom) throws StandardException(Code)
Update a conglomerate directory entry.

Update the Conglom column of the Conglomerate Directory. The Conglomerate with id "conglomid" is replaced by "new_conglom".


Parameters:
  conglomid - The conglomid of conglomerate to replace.
Parameters:
  new_conglom - The new Conglom to update the conglom column to.
exception:
  StandardException - Standard exception policy.




createFinished
public void createFinished() throws StandardException(Code)
Database creation finished. Tell RawStore.
exception:
  StandardException - cloudscape standard error policy



disableLogArchiveMode
public void disableLogArchiveMode(boolean deleteOnlineArchivedLogFiles) throws StandardException(Code)



findMethodFactoryByFormat
public MethodFactory findMethodFactoryByFormat(UUID format)(Code)
Find an access method that implements a format type.
See Also:   AccessFactory.findMethodFactoryByFormat



findMethodFactoryByImpl
public MethodFactory findMethodFactoryByImpl(String impltype) throws StandardException(Code)
Find an access method that implements an implementation type.
See Also:   AccessFactory.findMethodFactoryByImpl



freeze
public void freeze() throws StandardException(Code)



getAndNameTransaction
public TransactionController getAndNameTransaction(ContextManager cm, String transName) throws StandardException(Code)



getDefaultLockingPolicy
protected LockingPolicy getDefaultLockingPolicy()(Code)
Return the default locking policy for this access manager. the default locking policy for this accessmanager.



getLockFactory
public LockFactory getLockFactory()(Code)



getNextConglomId
protected long getNextConglomId(int factory_type) throws StandardException(Code)
Return next conglomid to try to add the container with.

The conglomerate number has 2 parts. The low 4 bits are used to encode the factory which "owns" the conglomerate. The high 60 bits are used as a normal unique id mechanism.

So for example if the next id to assign is 0x54 the following will be the conglomid: if a HEAP (factory 0) - 0x540 if a BTREE (factory 1) - 0x541 And the next id assigned will be: if a HEAP (factory 0) - 0x550 if a BTREE (factory 1) - 0x551
Parameters:
  factory_type - factory id as gotten from getConglomerateFactoryId() The identifier to be used to open the conglomerate later.
exception:
  StandardException - Standard exception policy.




getRawStore
RawStoreFactory getRawStore()(Code)



getSystemLockLevel
abstract protected int getSystemLockLevel()(Code)
Return the locking level of the system.

This routine controls the lowest level of locking enabled for all locks for all tables accessed through this accessmanager. The concrete implementation may set this value always to table level locking for a client configuration, or it may set it to row level locking for a server configuration.

If TransactionController.MODE_RECORD is returned table may either be locked at table or row locking depending on the type of access expected (ie. level 3 will require table locking for heap scans.) TransactionController.MODE_TABLE if only table locking allowed,else returns TransactionController.MODE_RECORD.




getTransaction
public TransactionController getTransaction(ContextManager cm) throws StandardException(Code)



getTransactionInfo
public TransactionInfo[] getTransactionInfo()(Code)



getTransactionalProperties
PropertyConglomerate getTransactionalProperties()(Code)



getXAResourceManager
public Object getXAResourceManager() throws StandardException(Code)
Return the XAResourceManager associated with this AccessFactory.

Returns an object which can be used to implement the "offline" 2 phase commit interaction between the accessfactory and outstanding transaction managers taking care of in-doubt transactions. The XAResourceManager associated with this accessfactory.




init
public void init(boolean dbOnly, Dictionary p)(Code)



isReadOnly
public boolean isReadOnly()(Code)



map
public Serializable map(String key, Serializable value, Dictionary p) throws StandardException(Code)



newCacheable
public Cacheable newCacheable(CacheManager cm)(Code)



registerAccessMethod
public void registerAccessMethod(MethodFactory factory)(Code)



startXATransaction
public Object startXATransaction(ContextManager cm, int format_id, byte[] global_id, byte[] branch_id) throws StandardException(Code)
Start a global transaction.

Get a transaction controller with which to manipulate data within the access manager. Implicitly creates an access context.

Must only be called if no other transaction context exists in the current context manager. If another transaction exists in the context an exception will be thrown.

The (format_id, global_id, branch_id) triplet is meant to come exactly from a javax.transaction.xa.Xid. We don't use Xid so that the system can be delivered on a non-1.2 vm system and not require the javax classes in the path.
Parameters:
  cm - The context manager for the current context.
Parameters:
  format_id - the format id part of the Xid - ie. Xid.getFormatId().
Parameters:
  global_id - the global transaction identifier part of XID - ie.Xid.getGlobalTransactionId().
Parameters:
  branch_id - The branch qualifier of the Xid - ie. Xid.getBranchQaulifier()
exception:
  StandardException - Standard exception policy.
See Also:   TransactionController




stop
public void stop()(Code)



unfreeze
public void unfreeze() throws StandardException(Code)



validate
public boolean validate(String key, Serializable value, Dictionary p) throws StandardException(Code)



waitForPostCommitToFinishWork
public void waitForPostCommitToFinishWork()(Code)



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)

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