com.oy.shared.lw.samples.mysqlrepl
Class MySqlReplConnectionPool.DefaultConnectionPool

java.lang.Object
  extended bycom.oy.shared.lw.samples.mysqlrepl.MySqlReplConnectionPool.DefaultConnectionPool
All Implemented Interfaces:
MySqlReplConnectionPool
Enclosing class:
MySqlReplConnectionPool

public static class MySqlReplConnectionPool.DefaultConnectionPool
extends java.lang.Object
implements MySqlReplConnectionPool


Nested Class Summary
 
Nested classes inherited from class com.oy.shared.lw.samples.mysqlrepl.MySqlReplConnectionPool
MySqlReplConnectionPool.DefaultConnectionPool
 
Field Summary
private  java.lang.String masterConnStr
           
private  java.lang.String slaveConnStr
           
 
Constructor Summary
MySqlReplConnectionPool.DefaultConnectionPool(java.lang.String masterConnStr, java.lang.String slaveConnStr)
           
 
Method Summary
 java.sql.Connection borrowToMaster()
           
 java.sql.Connection borrowToSlave()
           
private  void releaseAny(java.sql.Connection conn)
           
 void releaseToMaster(java.sql.Connection conn)
           
 void releaseToSlave(java.sql.Connection conn)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

masterConnStr

private java.lang.String masterConnStr

slaveConnStr

private java.lang.String slaveConnStr
Constructor Detail

MySqlReplConnectionPool.DefaultConnectionPool

public MySqlReplConnectionPool.DefaultConnectionPool(java.lang.String masterConnStr,
                                                     java.lang.String slaveConnStr)
Method Detail

borrowToMaster

public java.sql.Connection borrowToMaster()
                                   throws java.sql.SQLException
Specified by:
borrowToMaster in interface MySqlReplConnectionPool
Throws:
java.sql.SQLException

borrowToSlave

public java.sql.Connection borrowToSlave()
                                  throws java.sql.SQLException
Specified by:
borrowToSlave in interface MySqlReplConnectionPool
Throws:
java.sql.SQLException

releaseAny

private void releaseAny(java.sql.Connection conn)

releaseToMaster

public void releaseToMaster(java.sql.Connection conn)
Specified by:
releaseToMaster in interface MySqlReplConnectionPool

releaseToSlave

public void releaseToSlave(java.sql.Connection conn)
Specified by:
releaseToSlave in interface MySqlReplConnectionPool


Copyright (C) 2005-2006 Pavel Simakov
http://www.softwaresecretweapons.com