KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > continuent > sequoia > controller > scheduler > raidb0 > RAIDb0PassThroughLevelScheduler


1 /**
2  * Sequoia: Database clustering technology.
3  * Copyright (C) 2002-2004 French National Institute For Research In Computer
4  * Science And Control (INRIA).
5  * Copyright (C) 2005 AmicoSoft, Inc. dba Emic Networks
6  * Contact: sequoia@continuent.org
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  * Initial developer(s): Emmanuel Cecchet.
21  * Contributor(s): Jean-Bernard van Zuylen.
22  */

23
24 package org.continuent.sequoia.controller.scheduler.raidb0;
25
26 import java.sql.SQLException JavaDoc;
27
28 import org.continuent.sequoia.common.exceptions.RollbackException;
29 import org.continuent.sequoia.common.xml.DatabasesXmlTags;
30 import org.continuent.sequoia.controller.requestmanager.RAIDbLevels;
31 import org.continuent.sequoia.controller.requests.AbstractWriteRequest;
32 import org.continuent.sequoia.controller.requests.ParsingGranularities;
33 import org.continuent.sequoia.controller.requests.SelectRequest;
34 import org.continuent.sequoia.controller.requests.StoredProcedure;
35 import org.continuent.sequoia.controller.scheduler.AbstractScheduler;
36
37 /**
38  * This scheduler provides scheduling for RAIDb-0 controllers. Read and write
39  * can occur in parallel, serializability being ensured by the load balancer.
40  *
41  * @author <a HREF="mailto:Emmanuel.Cecchet@inria.fr">Emmanuel Cecchet </a>
42  * @author <a HREF="mailto:jbvanzuylen@transwide.com">Jean-Bernard van Zuylen
43  * </a>
44  * @version 1.0
45  */

46 public class RAIDb0PassThroughLevelScheduler extends AbstractScheduler
47 {
48
49   //
50
// How the code is organized ?
51
//
52
// 1. Member variables
53
// 2. Constructor
54
// 3. Request handling
55
// 4. Transaction management
56
// 5. Debug/Monitoring
57
//
58

59   //
60
// Constructor
61
//
62

63   /**
64    * Creates a new Single Database Scheduler
65    */

66   public RAIDb0PassThroughLevelScheduler()
67   {
68     super(RAIDbLevels.RAIDb0, ParsingGranularities.NO_PARSING);
69   }
70
71   //
72
// Request Handling
73
//
74

75   /**
76    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#scheduleNonSuspendedReadRequest(SelectRequest)
77    */

78   public final void scheduleNonSuspendedReadRequest(SelectRequest request)
79   {
80   }
81
82   /**
83    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#readCompletedNotify(SelectRequest)
84    */

85   public final void readCompletedNotify(SelectRequest request)
86   {
87   }
88
89   /**
90    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#scheduleWriteRequest(AbstractWriteRequest)
91    */

92   public final void scheduleNonSuspendedWriteRequest(
93       AbstractWriteRequest request)
94   {
95   }
96
97   /**
98    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#notifyWriteCompleted(AbstractWriteRequest)
99    */

100   public final void notifyWriteCompleted(AbstractWriteRequest request)
101   {
102   }
103
104   /**
105    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#scheduleNonSuspendedStoredProcedure(org.continuent.sequoia.controller.requests.StoredProcedure)
106    */

107   public final void scheduleNonSuspendedStoredProcedure(StoredProcedure proc)
108       throws SQLException JavaDoc, RollbackException
109   {
110   }
111
112   /**
113    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#notifyStoredProcedureCompleted(org.continuent.sequoia.controller.requests.StoredProcedure)
114    */

115   public final void notifyStoredProcedureCompleted(StoredProcedure proc)
116   {
117   }
118
119   //
120
// Transaction Management
121
//
122

123   /**
124    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#commitTransaction(long)
125    */

126   protected final void commitTransaction(long transactionId)
127   {
128   }
129
130   /**
131    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#rollbackTransaction(long)
132    */

133   protected final void rollbackTransaction(long transactionId)
134   {
135   }
136
137   /**
138    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#rollbackTransaction(long,
139    * String)
140    */

141   protected final void rollbackTransaction(long transactionId,
142       String JavaDoc savepointName)
143   {
144   }
145
146   /**
147    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#setSavepointTransaction(long,
148    * String)
149    */

150   protected final void setSavepointTransaction(long transactionId, String JavaDoc name)
151   {
152   }
153
154   /**
155    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#releaseSavepointTransaction(long,
156    * String)
157    */

158   protected final void releaseSavepointTransaction(long transactionId,
159       String JavaDoc name)
160   {
161   }
162
163   //
164
// Debug/Monitoring
165
//
166
/**
167    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#getXmlImpl()
168    */

169   public String JavaDoc getXmlImpl()
170   {
171     StringBuffer JavaDoc info = new StringBuffer JavaDoc();
172     info.append("<" + DatabasesXmlTags.ELT_RAIDb0Scheduler + " "
173         + DatabasesXmlTags.ATT_level + "=\"" + DatabasesXmlTags.VAL_passThrough
174         + "\"/>");
175     return info.toString();
176   }
177 }
178
Popular Tags