Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

BackendRecoveryInfo.java

00001 /**
00002  * C-JDBC: Clustered JDBC.
00003  * Copyright (C) 2002-2005 French National Institute For Research In Computer
00004  * Science And Control (INRIA).
00005  * Contact: c-jdbc@objectweb.org
00006  * 
00007  * This library is free software; you can redistribute it and/or modify it
00008  * under the terms of the GNU Lesser General Public License as published by the
00009  * Free Software Foundation; either version 2.1 of the License, or any later
00010  * version.
00011  * 
00012  * This library is distributed in the hope that it will be useful, but WITHOUT
00013  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
00015  * for more details.
00016  * 
00017  * You should have received a copy of the GNU Lesser General Public License
00018  * along with this library; if not, write to the Free Software Foundation,
00019  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
00020  *
00021  * Initial developer(s): Nicolas Modrzyk.
00022  * Contributor(s): Emmanuel Cecchet.
00023  */
00024 
00025 package org.objectweb.cjdbc.controller.recoverylog;
00026 
00027 /**
00028  * A instance of this class gives information on a specific backend state from
00029  * the recovery log. For a backend, we have its name, the virtual database that
00030  * owns it, the lastKnownCheckpoint,and the state of the backend ().
00031  * 
00032  * @author <a href="mailto:Nicolas.Modrzyk@inrialpes.fr">Nicolas Modrzyk </a>
00033  * @author <a href="mailto:Emmanuel.Cecchet@inria.fr">Emmanuel Cecchet </a>
00034  * @version 1.0
00035  */
00036 public final class BackendRecoveryInfo
00037 {
00038   private String backendName;
00039   private String checkpoint;
00040   /** State is defined in <code>BackendState</code> */
00041   private int    backendState;
00042   private String virtualDatabase;
00043 
00044   /**
00045    * Creates a new <code>BackendRecoveryInfo</code> object
00046    * 
00047    * @param backendName backend name
00048    * @param lastCheckpoint last known checkpoint name
00049    * @param backendState backend state as defined in <code>BackendState</code>
00050    * @param virtualDatabase virtual database name
00051    */
00052   public BackendRecoveryInfo(String backendName, String lastCheckpoint,
00053       int backendState, String virtualDatabase)
00054   {
00055     this.backendName = backendName;
00056     this.checkpoint = lastCheckpoint;
00057     this.backendState = backendState;
00058     this.virtualDatabase = virtualDatabase;
00059   }
00060 
00061   /**
00062    * Returns the backendName value.
00063    * 
00064    * @return Returns the backendName.
00065    */
00066   public String getBackendName()
00067   {
00068     return backendName;
00069   }
00070 
00071   /**
00072    * Sets the backendName value.
00073    * 
00074    * @param backendName The backendName to set.
00075    */
00076   public void setBackendName(String backendName)
00077   {
00078     this.backendName = backendName;
00079   }
00080 
00081   /**
00082    * Returns the backend state as defined in <code>BackendState</code>.
00083    * 
00084    * @return Returns the backend state.
00085    */
00086   public int getBackendState()
00087   {
00088     return backendState;
00089   }
00090 
00091   /**
00092    * Sets the backend state value. The value must be defined in
00093    * <code>BackendState</code>
00094    * 
00095    * @param backendState The backend state to set.
00096    */
00097   public void setBackendState(int backendState)
00098   {
00099     this.backendState = backendState;
00100   }
00101 
00102   /**
00103    * Returns the lastCheckpoint value.
00104    * 
00105    * @return Returns the lastCheckpoint.
00106    */
00107   public String getCheckpoint()
00108   {
00109     return checkpoint;
00110   }
00111 
00112   /**
00113    * Sets the lastCheckpoint value.
00114    * 
00115    * @param lastCheckpoint The lastCheckpoint to set.
00116    */
00117   public void setCheckpoint(String lastCheckpoint)
00118   {
00119     this.checkpoint = lastCheckpoint;
00120   }
00121 
00122   /**
00123    * Returns the virtualDatabase value.
00124    * 
00125    * @return Returns the virtualDatabase.
00126    */
00127   public String getVirtualDatabase()
00128   {
00129     return virtualDatabase;
00130   }
00131 
00132   /**
00133    * Sets the virtualDatabase value.
00134    * 
00135    * @param virtualDatabase The virtualDatabase to set.
00136    */
00137   public void setVirtualDatabase(String virtualDatabase)
00138   {
00139     this.virtualDatabase = virtualDatabase;
00140   }
00141 
00142   /**
00143    * @see java.lang.Object#toString()
00144    */
00145   public String toString()
00146   {
00147     return "Backend:" + this.backendName + ",VirtualDatabase:"
00148         + this.virtualDatabase + ",State:" + this.backendState + ",Checkpoint:"
00149         + this.checkpoint;
00150   }
00151 }

Generated on Mon Apr 11 22:01:29 2005 for C-JDBC by  doxygen 1.3.9.1