001: /**
002: * Sequoia: Database clustering technology.
003: * Copyright (C) 2002-2004 French National Institute For Research In Computer
004: * Science And Control (INRIA).
005: * Copyright (C) 2005 AmicoSoft, Inc. dba Emic Networks
006: * Contact: sequoia@continuent.org
007: *
008: * Licensed under the Apache License, Version 2.0 (the "License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.apache.org/licenses/LICENSE-2.0
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: * Initial developer(s): Emmanuel Cecchet.
021: * Contributor(s): Jean-Bernard van Zuylen.
022: */package org.continuent.sequoia.controller.scheduler.singledb;
023:
024: import java.sql.SQLException;
025:
026: import org.continuent.sequoia.common.exceptions.RollbackException;
027: import org.continuent.sequoia.common.xml.DatabasesXmlTags;
028: import org.continuent.sequoia.controller.requestmanager.RAIDbLevels;
029: import org.continuent.sequoia.controller.requests.AbstractWriteRequest;
030: import org.continuent.sequoia.controller.requests.ParsingGranularities;
031: import org.continuent.sequoia.controller.requests.SelectRequest;
032: import org.continuent.sequoia.controller.requests.StoredProcedure;
033: import org.continuent.sequoia.controller.scheduler.AbstractScheduler;
034:
035: /**
036: * This scheduler provides scheduling for a single backend instance. It is
037: * really trivial and does not yet support distribution.
038: *
039: * @author <a href="mailto:Emmanuel.Cecchet@inria.fr">Emmanuel Cecchet </a>
040: * @author <a href="mailto:jbvanzuylen@transwide.com">Jean-Bernard van Zuylen
041: * </a>
042: * @version 1.0
043: */
044: public class SingleDBPassThroughScheduler extends AbstractScheduler {
045:
046: //
047: // Constructor
048: //
049:
050: /**
051: * Creates a new Single Database Scheduler
052: */
053: public SingleDBPassThroughScheduler() {
054: super (RAIDbLevels.SingleDB, ParsingGranularities.NO_PARSING);
055: }
056:
057: //
058: // Request Handling
059: //
060:
061: /**
062: * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#scheduleNonSuspendedReadRequest(SelectRequest)
063: */
064: public final void scheduleNonSuspendedReadRequest(
065: SelectRequest request) {
066: }
067:
068: /**
069: * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#readCompletedNotify(SelectRequest)
070: */
071: public final void readCompletedNotify(SelectRequest request) {
072: }
073:
074: /**
075: * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#scheduleWriteRequest(AbstractWriteRequest)
076: */
077: public final void scheduleNonSuspendedWriteRequest(
078: AbstractWriteRequest request) {
079: }
080:
081: /**
082: * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#notifyWriteCompleted(AbstractWriteRequest)
083: */
084: public final void notifyWriteCompleted(AbstractWriteRequest request) {
085: }
086:
087: /**
088: * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#scheduleNonSuspendedStoredProcedure(org.continuent.sequoia.controller.requests.StoredProcedure)
089: */
090: public final void scheduleNonSuspendedStoredProcedure(
091: StoredProcedure proc) throws SQLException,
092: RollbackException {
093: }
094:
095: /**
096: * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#notifyStoredProcedureCompleted(org.continuent.sequoia.controller.requests.StoredProcedure)
097: */
098: public final void notifyStoredProcedureCompleted(
099: StoredProcedure proc) {
100: }
101:
102: //
103: // Transaction Management
104: //
105:
106: /**
107: * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#commitTransaction(long)
108: */
109: protected final void commitTransaction(long transactionId) {
110: }
111:
112: /**
113: * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#rollbackTransaction(long)
114: */
115: protected final void rollbackTransaction(long transactionId) {
116: }
117:
118: /**
119: * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#rollbackTransaction(long,
120: * String)
121: */
122: protected final void rollbackTransaction(long transactionId,
123: String savepointName) {
124: }
125:
126: /**
127: * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#setSavepointTransaction(long,
128: * String)
129: */
130: protected final void setSavepointTransaction(long transactionId,
131: String name) {
132: }
133:
134: /**
135: * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#releaseSavepointTransaction(long,
136: * String)
137: */
138: protected final void releaseSavepointTransaction(
139: long transactionId, String name) {
140: }
141:
142: //
143: // Debug/Monitoring
144: //
145: /**
146: * @see org.continuent.sequoia.controller.scheduler.AbstractScheduler#getXmlImpl()
147: */
148: public String getXmlImpl() {
149: return "<" + DatabasesXmlTags.ELT_SingleDBScheduler + " "
150: + DatabasesXmlTags.ATT_level + "=\""
151: + DatabasesXmlTags.VAL_passThrough + "\"/>";
152: }
153: }
|