001/* 002 * HA-JDBC: High-Availability JDBC 003 * Copyright (C) 2012 Paul Ferraro 004 * 005 * This program is free software: you can redistribute it and/or modify 006 * it under the terms of the GNU Lesser General Public License as published by 007 * the Free Software Foundation, either version 3 of the License, or 008 * (at your option) any later version. 009 * 010 * This program is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 * GNU Lesser General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public License 016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 017 */ 018package net.sf.hajdbc; 019 020/** 021 * @author Paul Ferraro 022 */ 023public class SimpleDatabaseClusterConfigurationFactory<Z, D extends Database<Z>> implements DatabaseClusterConfigurationFactory<Z, D> 024{ 025 private static final long serialVersionUID = -6882420729056764462L; 026 027 private final DatabaseClusterConfiguration<Z, D> configuration; 028 029 public SimpleDatabaseClusterConfigurationFactory(DatabaseClusterConfiguration<Z, D> configuration) 030 { 031 this.configuration = configuration; 032 } 033 034 /** 035 * {@inheritDoc} 036 * @see net.sf.hajdbc.DatabaseClusterConfigurationFactory#createConfiguration() 037 */ 038 @Override 039 public DatabaseClusterConfiguration<Z, D> createConfiguration() 040 { 041 return this.configuration; 042 } 043 044 /** 045 * {@inheritDoc} 046 * @see net.sf.hajdbc.DatabaseClusterConfigurationListener#added(net.sf.hajdbc.Database, net.sf.hajdbc.DatabaseClusterConfiguration) 047 */ 048 @Override 049 public void added(D database, DatabaseClusterConfiguration<Z, D> configuration) 050 { 051 } 052 053 /** 054 * {@inheritDoc} 055 * @see net.sf.hajdbc.DatabaseClusterConfigurationListener#removed(net.sf.hajdbc.Database, net.sf.hajdbc.DatabaseClusterConfiguration) 056 */ 057 @Override 058 public void removed(D database, DatabaseClusterConfiguration<Z, D> configuration) 059 { 060 } 061}