1 24 25 package org.objectweb.cjdbc.controller.virtualdatabase.protocol; 26 27 import java.io.Serializable ; 28 import java.sql.SQLException ; 29 30 import org.objectweb.cjdbc.controller.requestmanager.distributed.DistributedRequestManager; 31 32 40 public abstract class DistributedTransactionMarker implements Serializable 41 { 42 43 protected long transactionId; 44 45 50 public DistributedTransactionMarker(long transactionId) 51 { 52 this.transactionId = transactionId; 53 } 54 55 62 public abstract void scheduleCommand(DistributedRequestManager drm) 63 throws SQLException ; 64 65 73 public abstract Object executeCommand(DistributedRequestManager drm) 74 throws SQLException ; 75 76 81 public long getTransactionId() 82 { 83 return transactionId; 84 } 85 86 89 public boolean equals(Object obj) 90 { 91 if (obj == null) 92 return false; 93 if (obj.getClass().equals(this.getClass())) 94 return transactionId == ((DistributedTransactionMarker) obj) 95 .getTransactionId(); 96 else 97 return false; 98 } 99 } 100 | Popular Tags |