| 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 void | addDmiDescriptor(DmiDescriptor d) | public void | addReference(TCObject tco) | public void | apply(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 void | arrayChanged(TCObject src, int startPos, Object array, int length) | public boolean | begin(String lock, int lockLevel) | public void | checkWriteAccess(Object context) | public void | commit(String lockName) | public void | createObject(TCObject source) | public void | createRoot(String name, ObjectID id) | public void | disableTransactionLogging() | public void | enableTransactionLogging() | public void | fieldChanged(TCObject source, String classname, String fieldname, Object newValue, int index) | public ChannelIDProvider | getChannelIDProvider() | public ClientTransaction | getTransaction() | public boolean | isHeldByCurrentThread(String lockName, int lockLevel) | public boolean | isLockOnTopStack(String lockName) | public boolean | isLocked(String lockName, int lockLevel) | public boolean | isTransactionLoggingDisabled() | public void | literalValueChanged(TCObject source, Object newValue, Object oldValue) | public int | localHeldCount(String lockName, int lockLevel) | public void | lock(String lockName, int lockLevel) | public void | logicalInvoke(TCObject source, int method, String methodName, Object[] parameters) | public void | notify(String lockName, boolean all, Object object) | public int | queueLength(String lockName) | public void | receivedAcknowledgement(SessionID sessionID, TransactionID requestID) | public void | receivedBatchAcknowledgement(TxnBatchID batchID) | public boolean | tryBegin(String lock, WaitInvocation timeout, int lockLevel) Try with wait() to begin a thread local transaction. | public void | unlock(String lockName) | public void | wait(String lockName, WaitInvocation call, Object object) | public int | waitLength(String lockName) |
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 |
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 |
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 |
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 |
waitLength | public int waitLength(String lockName)(Code) | | Get wait() length on this lock
Parameters: lockName - Lock name Wait length |
|
|