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): Nicolas Modrzyk. 00022 * Contributor(s): ______________________. 00023 */ 00024 00025 package org.objectweb.cjdbc.common.jmx.mbeans; 00026 00027 import java.sql.SQLException; 00028 00029 /** 00030 * This class defines a AbstractLoadBalancerMBean 00031 * 00032 * @author <a href="mailto:Nicolas.Modrzyk@inrialpes.fr">Nicolas Modrzyk</a> 00033 * @version 1.0 00034 */ 00035 public interface AbstractLoadBalancerMBean 00036 { 00037 /** 00038 * Return the load balancer RAIDb level 00039 * 00040 * @return the RAIDb level 00041 */ 00042 int getRAIDbLevel(); 00043 00044 /** 00045 * Sets the RAIDbLevel. 00046 * 00047 * @param raidbLevel The RAIDb level to set 00048 */ 00049 void setRAIDbLevel(int raidbLevel); 00050 00051 /** 00052 * Get the needed query parsing granularity. 00053 * 00054 * @return needed query parsing granularity 00055 */ 00056 int getParsingGranularity(); 00057 00058 /** 00059 * Set the needed query parsing granularity. 00060 * 00061 * @param parsingGranularity the granularity to set 00062 */ 00063 void setParsingGranularity(int parsingGranularity); 00064 00065 /** 00066 * Associate a weight to a backend identified by its logical name. 00067 * 00068 * @param name the backend name 00069 * @param w the weight 00070 * @throws SQLException if an error occurs 00071 */ 00072 void setWeight(String name, int w) throws SQLException; 00073 00074 /** 00075 * Return generic information about the load balancer. 00076 * 00077 * @return load balancer information 00078 */ 00079 String getInformation(); 00080 }