net.dataforte.cassandra.pool
Class DataSourceProxy
java.lang.Object
net.dataforte.cassandra.pool.DataSourceProxy
- Direct Known Subclasses:
- DataSource
public class DataSourceProxy
- extends Object
The DataSource proxy lets us implements methods that don't exist in the
current CassandraThriftDataSource interface but might be methods that are
part of a future CassandraThriftDataSource interface.
- Author:
- Tristan Tarrant
pool
protected volatile ConnectionPool pool
poolProperties
protected PoolConfiguration poolProperties
DataSourceProxy
public DataSourceProxy(PoolConfiguration poolProperties)
getPoolProperties
public PoolConfiguration getPoolProperties()
createPool
public ConnectionPool createPool()
throws org.apache.thrift.TException
- Sets up the connection pool, by creating a pooling driver.
- Returns:
- Driver
- Throws:
org.apache.thrift.TException
getConnection
public org.apache.cassandra.thrift.Cassandra.Client getConnection()
throws org.apache.thrift.TException
- Throws:
org.apache.thrift.TException
releaseConnection
public void releaseConnection(org.apache.cassandra.thrift.Cassandra.Client connection)
getPool
public ConnectionPool getPool()
throws org.apache.thrift.TException
- Throws:
org.apache.thrift.TException
close
public void close()
close
public void close(boolean all)
getPoolSize
public int getPoolSize()
throws org.apache.thrift.TException
- Throws:
org.apache.thrift.TException
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2011. All Rights Reserved.