KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > cjdbc > common > shared > BackendState


1 /**
2  * C-JDBC: Clustered JDBC.
3  * Copyright (C) 2002-2005 French National Institute For Research In Computer
4  * Science And Control (INRIA).
5  * Contact: c-jdbc@objectweb.org
6  *
7  * This library is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as published by the
9  * Free Software Foundation; either version 2.1 of the License, or any later
10  * version.
11  *
12  * This library is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15  * for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this library; if not, write to the Free Software Foundation,
19  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
20  *
21  * Initial developer(s): Nicolas Modrzyk.
22  * Contributor(s): Emmanuel Cecchet.
23  */

24
25 package org.objectweb.cjdbc.common.shared;
26
27 /**
28  * This describes the different backend states
29  *
30  * @author <a HREF="mailto:Nicolas.Modrzyk@inrialpes.fr">Nicolas Modrzyk </a>
31  * @author <a HREF="mailto:emmanuel.cecchet@emicnetworks.com">Emmanuel Cecchet
32  * </a>
33  * @version 1.0
34  */

35 public final class BackendState
36 {
37   /**
38    * The backend can execute read requests, but not write requests
39    */

40   public static final int READ_ENABLED_WRITE_DISABLED = 0;
41
42   /**
43    * The backend can execute read and write requests
44    */

45   public static final int READ_ENABLED_WRITE_ENABLED = 1;
46
47   /**
48    * The backend can execute write requests but not read requests
49    */

50   public static final int READ_DISABLED_WRITE_ENABLED = 2;
51
52   /**
53    * The backend cannot execute any requests
54    */

55   public static final int DISABLED = 3;
56
57   /**
58    * The backend is loading data from a dump file
59    */

60   public static final int RECOVERING = 4;
61
62   /**
63    * The backend is set for disabled. It is finishing to execute open
64    * transactions
65    */

66   public static final int DISABLING = 5;
67
68   /**
69    * The backend is in a restore process. The content of a backup file is being
70    * copied onto the backen
71    */

72   public static final int BACKUPING = 6;
73
74   /**
75    * Unknown backend state. This is used when the state of the backend cannot be
76    * determined properly. This is the state the backend is set to after a
77    * backup, restore or recovery failure.
78    */

79   public static final int UNKNOWN = -1;
80
81   /**
82    * Replaying request from the recovery log
83    */

84   public static final int REPLAYING = 7;
85 }
Popular Tags