KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > continuent > sequoia > common > exceptions > NoMoreBackendException


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): Nicolas Modrzyk.
21  * Contributor(s): Emmanuel Cecchet.
22  */

23
24 package org.continuent.sequoia.common.exceptions;
25
26 import java.sql.SQLException JavaDoc;
27
28 /**
29  * This class defines a NoMoreBackendException. This means that a controller
30  * does not have any backend left to execute the query. The exception might
31  * carry an optional identifier of the request that failed. This is useful to
32  * unlog a remote request that has failed since each controller has its own
33  * local id for each distributed request.
34  *
35  * @author <a HREF="mailto:Nicolas.Modrzyk@inrialpes.fr">Nicolas Modrzyk </a>
36  * @author <a HREF="mailto:emmanuel.cecchet@emicnetworks.com">Emmanuel Cecchet
37  * </a>
38  * @version 1.0
39  */

40 public class NoMoreBackendException extends SQLException JavaDoc
41 {
42   private static final long serialVersionUID = 8265839783849395122L;
43
44   private long recoveryLogId = 0;
45   private String JavaDoc login = null;
46
47   /**
48    * Creates a new <code>NoMoreBackendException</code> object
49    */

50   public NoMoreBackendException()
51   {
52     super();
53   }
54
55   /**
56    * Creates a new <code>NoMoreBackendException</code> object
57    *
58    * @param reason the error message
59    */

60   public NoMoreBackendException(String JavaDoc reason)
61   {
62     super(reason);
63   }
64
65   /**
66    * Creates a new <code>NoMoreBackendException</code> object
67    *
68    * @param reason the error message
69    * @param sqlState the SQL state
70    */

71   public NoMoreBackendException(String JavaDoc reason, String JavaDoc sqlState)
72   {
73     super(reason, sqlState);
74   }
75
76   /**
77    * Creates a new <code>NoMoreBackendException</code> object
78    *
79    * @param reason the error message
80    * @param sqlState the SQL state
81    * @param vendorCode vendor specific code
82    */

83   public NoMoreBackendException(String JavaDoc reason, String JavaDoc sqlState, int vendorCode)
84   {
85     super(reason, sqlState, vendorCode);
86   }
87
88   /**
89    * Returns the recovery log id of the request that failed.
90    *
91    * @return Returns the recoveryLogId.
92    */

93   public long getRecoveryLogId()
94   {
95     return recoveryLogId;
96   }
97
98   /**
99    * Sets the recovery log id of the request that failed.
100    *
101    * @param recoveryLogId The recoveryLogId to set.
102    */

103   public void setRecoveryLogId(long recoveryLogId)
104   {
105     this.recoveryLogId = recoveryLogId;
106   }
107
108   /**
109    * Returns the login of the request that failed.
110    *
111    * @return Returns the login.
112    */

113   public String JavaDoc getLogin()
114   {
115     return login;
116   }
117
118   /**
119    * Sets the login of the request that failed.
120    *
121    * @param login The login to set.
122    */

123   public void setLogin(String JavaDoc login)
124   {
125     this.login = login;
126   }
127 }
Popular Tags