00001 /** 00002 * C-JDBC: Clustered JDBC. 00003 * Copyright (C) 2002-2004 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): Emmanuel Cecchet. 00022 * Contributor(s): _________________________. 00023 */ 00024 00025 package org.objectweb.cjdbc.controller.requestmanager; 00026 00027 /** 00028 * This class carry transaction marker (begin/commit/rollback) metadata. 00029 * <p> 00030 * Metadata include a transaction id, a login and a timeout. 00031 * 00032 * @author <a href="mailto:Emmanuel.Cecchet@inria.fr">Emmanuel Cecchet</a> 00033 * @version 1.0 00034 */ 00035 public class TransactionMarkerMetaData 00036 { 00037 private long transactionId; 00038 private long timeout; 00039 private String login; 00040 00041 /** 00042 * Creates a new <code>TransactionMarkerMetaData</code>. 00043 * 00044 * @param transactionId the transaction identifier. 00045 * @param timeout the transaction timeout in seconds. 00046 * @param login the user login. 00047 */ 00048 public TransactionMarkerMetaData( 00049 long transactionId, 00050 long timeout, 00051 String login) 00052 { 00053 this.transactionId = transactionId; 00054 this.timeout = timeout; 00055 this.login = login; 00056 } 00057 00058 /** 00059 * Returns the login. 00060 * 00061 * @return String 00062 */ 00063 public String getLogin() 00064 { 00065 return login; 00066 } 00067 00068 /** 00069 * Returns the timeout. 00070 * 00071 * @return long 00072 */ 00073 public long getTimeout() 00074 { 00075 return timeout; 00076 } 00077 00078 /** 00079 * Returns the transactionId. 00080 * 00081 * @return int 00082 */ 00083 public long getTransactionId() 00084 { 00085 return transactionId; 00086 } 00087 00088 /** 00089 * Sets the login. 00090 * 00091 * @param login the login to set. 00092 */ 00093 public void setLogin(String login) 00094 { 00095 this.login = login; 00096 } 00097 00098 /** 00099 * Sets the timeout. 00100 * 00101 * @param timeout the timeout to set. 00102 */ 00103 public void setTimeout(long timeout) 00104 { 00105 this.timeout = timeout; 00106 } 00107 00108 /** 00109 * Sets the transactionId. 00110 * 00111 * @param transactionId the transactionId to set 00112 */ 00113 public void setTransactionId(long transactionId) 00114 { 00115 this.transactionId = transactionId; 00116 } 00117 }