KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > continuent > sequoia > controller > scheduler > raidb1 > RAIDb1PassThroughScheduler


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  * Copyright (C) 2005-2006 Continuent, Inc.
7  * Contact: sequoia@continuent.org
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  * Initial developer(s): Emmanuel Cecchet.
22  * Contributor(s): Jean-Bernard van Zuylen.
23  */

24
25 package org.continuent.sequoia.controller.scheduler.raidb1;
26
27 import java.sql.SQLException JavaDoc;
28
29 import org.continuent.sequoia.common.exceptions.RollbackException;
30 import org.continuent.sequoia.common.xml.DatabasesXmlTags;
31 import org.continuent.sequoia.controller.requestmanager.RAIDbLevels;
32 import org.continuent.sequoia.controller.requests.AbstractWriteRequest;
33 import org.continuent.sequoia.controller.requests.ParsingGranularities;
34 import org.continuent.sequoia.controller.requests.SelectRequest;
35 import org.continuent.sequoia.controller.requests.StoredProcedure;
36 import org.continuent.sequoia.controller.scheduler.AbstractScheduler;
37 import org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase;
38
39 /**
40  * This scheduler provides pass through scheduling for RAIDb-1 controllers.
41  * Requests are only assigned a unique id and passed to the load balancer.
42  *
43  * @author <a HREF="mailto:Emmanuel.Cecchet@inria.fr">Emmanuel Cecchet </a>
44  * @author <a HREF="mailto:jbvanzuylen@transwide.com">Jean-Bernard van Zuylen
45  * </a>
46  * @version 1.0
47  */

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

61   //
62
// Constructor
63
//
64

65   /**
66    * Creates a new Pass Through Scheduler that will set a new total order queue
67    * on the virtual database.
68    *
69    * @param vdb the virtual database we belong to
70    */

71   public RAIDb1PassThroughScheduler(VirtualDatabase vdb)
72   {
73     super(RAIDbLevels.RAIDb1, ParsingGranularities.NO_PARSING, vdb);
74   }
75
76   //
77
// Request Handling
78
//
79

80   /**
81    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#scheduleNonSuspendedReadRequest(SelectRequest)
82    */

83   public final void scheduleNonSuspendedReadRequest(SelectRequest request)
84   {
85   }
86
87   /**
88    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#readCompletedNotify(SelectRequest)
89    */

90   public final void readCompletedNotify(SelectRequest request)
91   {
92   }
93
94   /**
95    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#scheduleWriteRequest(AbstractWriteRequest)
96    */

97   public final void scheduleNonSuspendedWriteRequest(
98       AbstractWriteRequest request)
99   {
100   }
101
102   /**
103    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#notifyWriteCompleted(AbstractWriteRequest)
104    */

105   public final void notifyWriteCompleted(AbstractWriteRequest request)
106   {
107   }
108
109   /**
110    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#scheduleNonSuspendedStoredProcedure(org.continuent.sequoia.controller.requests.StoredProcedure)
111    */

112   public final void scheduleNonSuspendedStoredProcedure(StoredProcedure proc)
113       throws SQLException JavaDoc, RollbackException
114   {
115   }
116
117   /**
118    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#notifyStoredProcedureCompleted(org.continuent.sequoia.controller.requests.StoredProcedure)
119    */

120   public final void notifyStoredProcedureCompleted(StoredProcedure proc)
121   {
122   }
123
124   //
125
// Transaction Management
126
//
127

128   /**
129    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#commitTransaction(long)
130    */

131   protected final void commitTransaction(long transactionId)
132   {
133   }
134
135   /**
136    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#rollbackTransaction(long)
137    */

138   protected final void rollbackTransaction(long transactionId)
139   {
140   }
141
142   /**
143    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#rollbackTransaction(long,
144    * String)
145    */

146   protected final void rollbackTransaction(long transactionId,
147       String JavaDoc savepointName)
148   {
149   }
150
151   /**
152    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#setSavepointTransaction(long,
153    * String)
154    */

155   protected final void setSavepointTransaction(long transactionId, String JavaDoc name)
156   {
157   }
158
159   /**
160    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#releaseSavepointTransaction(long,
161    * String)
162    */

163   protected final void releaseSavepointTransaction(long transactionId,
164       String JavaDoc name)
165   {
166   }
167
168   /**
169    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#getXmlImpl()
170    */

171   public String JavaDoc getXmlImpl()
172   {
173     return "<" + DatabasesXmlTags.ELT_RAIDb1Scheduler + " "
174         + DatabasesXmlTags.ATT_level + "=\"" + DatabasesXmlTags.VAL_passThrough
175         + "\"/>";
176   }
177 }
178
Popular Tags