Java Doc for ClientTransactionManager.java in  » Net » Terracotta » com » tc » object » tx » 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 » Net » Terracotta » com.tc.object.tx 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.tc.object.tx.ClientTransactionManager

All known Subclasses:   com.tc.object.tx.ClientTransactionManagerImpl,  com.tc.object.tx.MockTransactionManager,
ClientTransactionManager
public interface ClientTransactionManager (Code)
Threadlocal based transaction manager interface. Changes go through here to the transaction for the current thread.
author:
   steve




Method Summary
public  voidaddDmiDescriptor(DmiDescriptor d)
    
public  voidaddReference(TCObject tco)
    
public  voidapply(TxnType txType, List lockIDs, Collection objectChanges, Set lookupObjectIDs, Map newRoots)
     When transactions come in from the L2 we use this method to apply them.
public  voidarrayChanged(TCObject src, int startPos, Object array, int length)
    
public  booleanbegin(String lock, int lockLevel)
    
public  voidcheckWriteAccess(Object context)
    
public  voidcommit(String lockName)
    
public  voidcreateObject(TCObject source)
    
public  voidcreateRoot(String name, ObjectID id)
    
public  voiddisableTransactionLogging()
    
public  voidenableTransactionLogging()
    
public  voidfieldChanged(TCObject source, String classname, String fieldname, Object newValue, int index)
    
public  ChannelIDProvidergetChannelIDProvider()
    
public  ClientTransactiongetTransaction()
    
public  booleanisHeldByCurrentThread(String lockName, int lockLevel)
    
public  booleanisLockOnTopStack(String lockName)
    
public  booleanisLocked(String lockName, int lockLevel)
    
public  booleanisTransactionLoggingDisabled()
    
public  voidliteralValueChanged(TCObject source, Object newValue, Object oldValue)
    
public  intlocalHeldCount(String lockName, int lockLevel)
    
public  voidlock(String lockName, int lockLevel)
    
public  voidlogicalInvoke(TCObject source, int method, String methodName, Object[] parameters)
    
public  voidnotify(String lockName, boolean all, Object object)
    
public  intqueueLength(String lockName)
    
public  voidreceivedAcknowledgement(SessionID sessionID, TransactionID requestID)
    
public  voidreceivedBatchAcknowledgement(TxnBatchID batchID)
    
public  booleantryBegin(String lock, WaitInvocation timeout, int lockLevel)
     Try with wait() to begin a thread local transaction.
public  voidunlock(String lockName)
    
public  voidwait(String lockName, WaitInvocation call, Object object)
    
public  intwaitLength(String lockName)
    



Method Detail
addDmiDescriptor
public void addDmiDescriptor(DmiDescriptor d)(Code)
Add distributed method call descriptor to current transaction
Parameters:
  d - Descriptor



addReference
public void addReference(TCObject tco)(Code)
Add reference to tco in current transaction
Parameters:
  tco - TCObject



apply
public void apply(TxnType txType, List lockIDs, Collection objectChanges, Set lookupObjectIDs, Map newRoots)(Code)
When transactions come in from the L2 we use this method to apply them. We will have to get a bit fancier because we can't apply any changes while we are in any transaction. The first version will not allow apply to happen while ANY tx is in progress. This is probably not exceptable. We will probably figure something out with the lock manager where we can accuire a read lock if a field is accessed in a transaction
Parameters:
  txType - Transaction type
Parameters:
  lockIDs - Locks involved in the transaction
Parameters:
  objectChanges - Collection of DNA indicating changes
Parameters:
  lookupObjectIDs - ObjectIDs
Parameters:
  newRoots - Map of new roots, Root name -> ObjectID



arrayChanged
public void arrayChanged(TCObject src, int startPos, Object array, int length)(Code)
Record an array change in the current transaction
Parameters:
  src - The TCObject for the array
Parameters:
  startPos - Start index in the array
Parameters:
  array - The new partial array or value
Parameters:
  length - Partial array length



begin
public boolean begin(String lock, int lockLevel)(Code)
Begin a thread local transaction
Parameters:
  lock - Lock name
Parameters:
  lockLevel - Lock level If begun



checkWriteAccess
public void checkWriteAccess(Object context)(Code)
Check whether current transaction has write access
Parameters:
  context - The object context
throws:
  com.tc.object.util.ReadOnlyException - If in read-only transaction



commit
public void commit(String lockName) throws UnlockedSharedObjectException(Code)
Commit a thread local current transaction
Parameters:
  lockName - Lock name
throws:
  UnlockedSharedObjectException - If a shared object is being accessed from outside a shared transaction



createObject
public void createObject(TCObject source)(Code)
Add new managed object to current transaction
Parameters:
  source - TCObject



createRoot
public void createRoot(String name, ObjectID id)(Code)
Add new root to current transaction
Parameters:
  name - Root name
Parameters:
  id - Object identifier



disableTransactionLogging
public void disableTransactionLogging()(Code)
Disable transaction logging



enableTransactionLogging
public void enableTransactionLogging()(Code)
Enable transaction logging



fieldChanged
public void fieldChanged(TCObject source, String classname, String fieldname, Object newValue, int index)(Code)
Record field change in current transaction
Parameters:
  source - TCObject for field
Parameters:
  classname - Class name
Parameters:
  fieldname - Field name
Parameters:
  newValue - New object
Parameters:
  index - Into array if field is an array



getChannelIDProvider
public ChannelIDProvider getChannelIDProvider()(Code)
Get channel provider for this txn manager Provider



getTransaction
public ClientTransaction getTransaction() throws UnlockedSharedObjectException(Code)
For optimistic stuff Transaction



isHeldByCurrentThread
public boolean isHeldByCurrentThread(String lockName, int lockLevel)(Code)
Check whether the current thread holds this lock
Parameters:
  lockName - Lock name
Parameters:
  lockLevel - Lock level



isLockOnTopStack
public boolean isLockOnTopStack(String lockName)(Code)
Check if lockID is on top of the transaction stack
Parameters:
  lockName -



isLocked
public boolean isLocked(String lockName, int lockLevel)(Code)
Check whether the lock wih this name in this thread is holding the lock at this level
Parameters:
  lockName - Lock name
Parameters:
  lockLevel - Lock level True if this lock is held by this thread at lockLevel



isTransactionLoggingDisabled
public boolean isTransactionLoggingDisabled()(Code)
Check whether transaction logging is disabled True if disabled, false if enabled



literalValueChanged
public void literalValueChanged(TCObject source, Object newValue, Object oldValue)(Code)
Record change in literal value in current transaction
Parameters:
  source - TCObject for literal value
Parameters:
  newValue - New value
Parameters:
  oldValue - Old value



localHeldCount
public int localHeldCount(String lockName, int lockLevel)(Code)
Get number of threads holding this lock
Parameters:
  lockName - Lock name
Parameters:
  lockLevel - Lock level Count



lock
public void lock(String lockName, int lockLevel)(Code)
Lock this lock at this level
Parameters:
  lockName - Lock name
Parameters:
  lockLevel - Lock level



logicalInvoke
public void logicalInvoke(TCObject source, int method, String methodName, Object[] parameters)(Code)
Record a logical method invocation
Parameters:
  source - TCObject for object
Parameters:
  method - Method constant from SerializationUtil
Parameters:
  methodName - Method name
Parameters:
  parameters - Parameter values in call



notify
public void notify(String lockName, boolean all, Object object) throws UnlockedSharedObjectException(Code)
Record notify() or notifyAll() call on object in current transaction
Parameters:
  lockName - Lock name
Parameters:
  all - True if notifyAll()
Parameters:
  object - Object notify called on
throws:
  UnlockedSharedObjectException - If shared object accessed outside lock



queueLength
public int queueLength(String lockName)(Code)
Get current queue length on this lock
Parameters:
  lockName - Lock name



receivedAcknowledgement
public void receivedAcknowledgement(SessionID sessionID, TransactionID requestID)(Code)
Record acknowledgement
Parameters:
  sessionID - Session identifier
Parameters:
  requestID - Transaction identifier



receivedBatchAcknowledgement
public void receivedBatchAcknowledgement(TxnBatchID batchID)(Code)
Record batch acknowledgement
Parameters:
  batchID - Transaction batch identifier



tryBegin
public boolean tryBegin(String lock, WaitInvocation timeout, int lockLevel)(Code)
Try with wait() to begin a thread local transaction.
Parameters:
  lock - Lock name
Parameters:
  timeout - Specification of wait()
Parameters:
  lockLevel - Lock level If begun



unlock
public void unlock(String lockName)(Code)
Unlock the lock
Parameters:
  Lock - name



wait
public void wait(String lockName, WaitInvocation call, Object object) throws UnlockedSharedObjectException, InterruptedException(Code)
Record wait() call on object in current transaction
Parameters:
  lockName - Lock name
Parameters:
  call - wait() call information
Parameters:
  object - Object being locked
throws:
  UnlockedSharedObjectException - If shared object accessed outside lock
throws:
  InterruptedException - If thread interrupted



waitLength
public int waitLength(String lockName)(Code)
Get wait() length on this lock
Parameters:
  lockName - Lock name Wait length



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