KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > continuent > sequoia > controller > scheduler > singledb > SingleDBPassThroughScheduler


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.singledb;
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 a single backend instance. It is
39  * really trivial and does not yet support distribution.
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 SingleDBPassThroughScheduler 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    * Creates a new Single Database Scheduler
61    */

62   public SingleDBPassThroughScheduler()
63   {
64     super(RAIDbLevels.SingleDB, ParsingGranularities.NO_PARSING);
65   }
66
67   //
68
// Request Handling
69
//
70

71   /**
72    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#scheduleNonSuspendedReadRequest(SelectRequest)
73    */

74   public final void scheduleNonSuspendedReadRequest(SelectRequest request)
75   {
76   }
77
78   /**
79    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#readCompletedNotify(SelectRequest)
80    */

81   public final void readCompletedNotify(SelectRequest request)
82   {
83   }
84
85   /**
86    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#scheduleWriteRequest(AbstractWriteRequest)
87    */

88   public final void scheduleNonSuspendedWriteRequest(
89       AbstractWriteRequest request)
90   {
91   }
92
93   /**
94    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#notifyWriteCompleted(AbstractWriteRequest)
95    */

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

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

111   public final void notifyStoredProcedureCompleted(StoredProcedure proc)
112   {
113   }
114
115   //
116
// Transaction Management
117
//
118

119   /**
120    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#commitTransaction(long)
121    */

122   protected final void commitTransaction(long transactionId)
123   {
124   }
125
126   /**
127    * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#rollbackTransaction(long)
128    */

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

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

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

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

165   public String JavaDoc getXmlImpl()
166   {
167     return "<" + DatabasesXmlTags.ELT_SingleDBScheduler + " "
168         + DatabasesXmlTags.ATT_level + "=\"" + DatabasesXmlTags.VAL_passThrough
169         + "\"/>";
170   }
171 }
172
Popular Tags