org.scale7.cassandra.pelops.pool
Class CommonsBackedPool.PooledConnection
java.lang.Object
org.scale7.cassandra.pelops.Connection
org.scale7.cassandra.pelops.pool.CommonsBackedPool.PooledConnection
- All Implemented Interfaces:
- IConnection, IThriftPool.IPooledConnection
- Enclosing class:
- CommonsBackedPool
public class CommonsBackedPool.PooledConnection
- extends Connection
- implements IThriftPool.IPooledConnection
Method Summary |
void |
corrupted()
Specify whether an exception has been thrown during usage of the connection. |
boolean |
isCorrupt()
|
void |
release()
Release a Connection that has previously been taken from the pool. |
String |
toString()
|
CommonsBackedPool.PooledConnection
public CommonsBackedPool.PooledConnection(Cluster.Node node,
String keyspace)
throws SocketException,
org.apache.thrift.TException,
org.apache.cassandra.thrift.InvalidRequestException
- Throws:
SocketException
org.apache.thrift.TException
org.apache.cassandra.thrift.InvalidRequestException
release
public void release()
- Description copied from interface:
IThriftPool.IPooledConnection
- Release a
Connection
that has previously been taken from the pool.
- Specified by:
release
in interface IThriftPool.IPooledConnection
corrupted
public void corrupted()
- Description copied from interface:
IThriftPool.IPooledConnection
- Specify whether an exception has been thrown during usage of the connection. If an exception has been thrown, the
connection will not re-used since it may be corrupted (for example, it may contain partially written
data that disrupts the serialization of the Thrift protocol) however it is remains essential that all
connection objects are released.
- Specified by:
corrupted
in interface IThriftPool.IPooledConnection
isCorrupt
public boolean isCorrupt()
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2011. All Rights Reserved.