1 24 25 package org.objectweb.cjdbc.controller.scheduler.raidb0; 26 27 import java.sql.SQLException ; 28 29 import org.objectweb.cjdbc.common.exceptions.RollbackException; 30 import org.objectweb.cjdbc.common.sql.AbstractWriteRequest; 31 import org.objectweb.cjdbc.common.sql.ParsingGranularities; 32 import org.objectweb.cjdbc.common.sql.SelectRequest; 33 import org.objectweb.cjdbc.common.sql.StoredProcedure; 34 import org.objectweb.cjdbc.common.xml.DatabasesXmlTags; 35 import org.objectweb.cjdbc.controller.requestmanager.RAIDbLevels; 36 import org.objectweb.cjdbc.controller.scheduler.AbstractScheduler; 37 38 47 public class RAIDb0PassThroughLevelScheduler extends AbstractScheduler 48 { 49 50 60 private long requestId; 61 62 66 69 public RAIDb0PassThroughLevelScheduler() 70 { 71 super(RAIDbLevels.RAIDb0, ParsingGranularities.NO_PARSING); 72 73 requestId = 0; 74 } 75 76 80 83 public final synchronized void scheduleReadRequest(SelectRequest request) 84 { 85 request.setId(requestId++); 86 } 87 88 91 public final void readCompletedNotify(SelectRequest request) 92 { 93 } 94 95 98 public final synchronized void scheduleNonSuspendedWriteRequest( 99 AbstractWriteRequest request) 100 { 101 request.setId(requestId++); 102 } 103 104 107 public final void notifyWriteCompleted(AbstractWriteRequest request) 108 { 109 } 110 111 114 public final synchronized void scheduleNonSuspendedStoredProcedure( 115 StoredProcedure proc) throws SQLException , RollbackException 116 { 117 proc.setId(requestId++); 118 } 119 120 123 public final void notifyStoredProcedureCompleted(StoredProcedure proc) 124 { 125 } 126 127 131 134 protected final void commitTransaction(long transactionId) 135 { 136 } 137 138 141 protected final void rollbackTransaction(long transactionId) 142 { 143 } 144 145 149 protected final void rollbackTransaction(long transactionId, 150 String savepointName) 151 { 152 } 153 154 158 protected final void setSavepointTransaction(long transactionId, String name) 159 { 160 } 161 162 166 protected final void releaseSavepointTransaction(long transactionId, 167 String name) 168 { 169 } 170 171 177 public String getXmlImpl() 178 { 179 StringBuffer info = new StringBuffer (); 180 info.append("<" + DatabasesXmlTags.ELT_RAIDb0Scheduler + " " 181 + DatabasesXmlTags.ATT_level + "=\"" + DatabasesXmlTags.VAL_passThrough 182 + "\"/>"); 183 return info.toString(); 184 } 185 } 186 | Popular Tags |