org.scale7.cassandra.pelops.pool
Class CommonsBackedPool.PooledConnection

java.lang.Object
  extended by org.scale7.cassandra.pelops.Connection
      extended by 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


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.scale7.cassandra.pelops.IConnection
IConnection.Config
 
Constructor Summary
CommonsBackedPool.PooledConnection(Cluster.Node node, String keyspace)
           
 
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()
           
 
Methods inherited from class org.scale7.cassandra.pelops.Connection
close, getAPI, getNode, isOpen, open
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.scale7.cassandra.pelops.IConnection
close, getAPI, getNode, isOpen, open
 

Constructor Detail

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
Method Detail

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.