1 4 package com.tc.object.tx; 5 6 import com.tc.net.protocol.tcm.ChannelIDProvider; 7 import com.tc.object.ObjectID; 8 import com.tc.object.TCObject; 9 import com.tc.object.dmi.DmiDescriptor; 10 import com.tc.object.lockmanager.api.LockID; 11 import com.tc.object.session.SessionID; 12 13 import java.util.Collection ; 14 import java.util.Map ; 15 import java.util.Set ; 16 17 22 public interface ClientTransactionManager { 23 24 28 public void begin(String lock, int lockLevel); 29 30 public boolean tryBegin(String lock, int lockLevel); 31 32 35 public void commit(String lockName) throws UnlockedSharedObjectException; 36 37 43 public void apply(TxnType txType, LockID[] lockIDs, Collection objectChanges, Set lookupObjectIDs, Map newRoots); 44 45 public void createObject(TCObject source); 46 47 public void createRoot(String name, ObjectID id); 48 49 public void literalValueChanged(TCObject source, Object newValue, Object oldValue); 50 51 public void fieldChanged(TCObject source, String classname, String fieldname, Object newValue, int index); 52 53 public void logicalInvoke(TCObject source, int method, String methodName, Object [] parameters); 54 55 public void wait(String lockName, WaitInvocation call, Object object) throws UnlockedSharedObjectException, InterruptedException ; 56 57 public void notify(String lockName, boolean all, Object object) throws UnlockedSharedObjectException; 58 59 public ClientTransaction getTransaction() throws UnlockedSharedObjectException; 61 62 public void receivedAcknowledgement(SessionID sessionID, TransactionID requestID); 63 64 public void receivedBatchAcknowledgement(TxnBatchID batchID); 65 66 public void checkWriteAccess(Object context); 67 68 public void addReference(TCObject tco); 69 70 public ChannelIDProvider getChannelIDProvider(); 71 72 public boolean isLocked(String lockName); 73 74 public void lock(String lockName, int lockLevel); 75 76 public void unlock(String lockName); 77 78 public boolean isHeldByCurrentThread(String lockName, int lockLevel); 79 80 public int queueLength(String lockName); 81 82 public int waitLength(String lockName); 83 84 public void enableTransactionLogging(); 85 86 public void disableTransactionLogging(); 87 88 public boolean isTransactionLoggingDisabled(); 89 90 public void arrayChanged(TCObject src, int startPos, Object array, int length); 91 92 public void addDmiDescriptor(DmiDescriptor d); 93 94 } 95 | Popular Tags |