public class ThriftSyncConnectionFactoryImpl.ThriftConnection
extends java.lang.Object
implements com.netflix.astyanax.connectionpool.Connection<org.apache.cassandra.thrift.Cassandra.Client>
| Constructor and Description |
|---|
ThriftSyncConnectionFactoryImpl.ThriftConnection(com.netflix.astyanax.connectionpool.HostConnectionPool<org.apache.cassandra.thrift.Cassandra.Client> pool,
int maxThriftSizeVal) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
equals(java.lang.Object obj)
Compares the toString of these clients
|
<R> com.netflix.astyanax.connectionpool.OperationResult<R> |
execute(com.netflix.astyanax.connectionpool.Operation<org.apache.cassandra.thrift.Cassandra.Client,R> op) |
com.netflix.astyanax.connectionpool.Host |
getHost() |
com.netflix.astyanax.connectionpool.HostConnectionPool<org.apache.cassandra.thrift.Cassandra.Client> |
getHostConnectionPool() |
com.netflix.astyanax.connectionpool.exceptions.ConnectionException |
getLastException() |
java.lang.Object |
getMetadata(java.lang.String key) |
long |
getOperationCount() |
boolean |
hasMetadata(java.lang.String key) |
void |
open() |
void |
openAsync(com.netflix.astyanax.connectionpool.Connection.AsyncOpenCallback<org.apache.cassandra.thrift.Cassandra.Client> callback) |
void |
setMetadata(java.lang.String key,
java.lang.Object data) |
void |
setTimeout(int timeout) |
java.lang.String |
toString() |
public ThriftSyncConnectionFactoryImpl.ThriftConnection(com.netflix.astyanax.connectionpool.HostConnectionPool<org.apache.cassandra.thrift.Cassandra.Client> pool,
int maxThriftSizeVal)
public <R> com.netflix.astyanax.connectionpool.OperationResult<R> execute(com.netflix.astyanax.connectionpool.Operation<org.apache.cassandra.thrift.Cassandra.Client,R> op)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
execute in interface com.netflix.astyanax.connectionpool.Connection<org.apache.cassandra.thrift.Cassandra.Client>com.netflix.astyanax.connectionpool.exceptions.ConnectionExceptionpublic void open()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
open in interface com.netflix.astyanax.connectionpool.Connection<org.apache.cassandra.thrift.Cassandra.Client>com.netflix.astyanax.connectionpool.exceptions.ConnectionExceptionpublic void openAsync(com.netflix.astyanax.connectionpool.Connection.AsyncOpenCallback<org.apache.cassandra.thrift.Cassandra.Client> callback)
openAsync in interface com.netflix.astyanax.connectionpool.Connection<org.apache.cassandra.thrift.Cassandra.Client>public void close()
close in interface com.netflix.astyanax.connectionpool.Connection<org.apache.cassandra.thrift.Cassandra.Client>public com.netflix.astyanax.connectionpool.HostConnectionPool<org.apache.cassandra.thrift.Cassandra.Client> getHostConnectionPool()
getHostConnectionPool in interface com.netflix.astyanax.connectionpool.Connection<org.apache.cassandra.thrift.Cassandra.Client>public com.netflix.astyanax.connectionpool.exceptions.ConnectionException getLastException()
getLastException in interface com.netflix.astyanax.connectionpool.Connection<org.apache.cassandra.thrift.Cassandra.Client>public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic long getOperationCount()
getOperationCount in interface com.netflix.astyanax.connectionpool.Connection<org.apache.cassandra.thrift.Cassandra.Client>public com.netflix.astyanax.connectionpool.Host getHost()
getHost in interface com.netflix.astyanax.connectionpool.Connection<org.apache.cassandra.thrift.Cassandra.Client>public void setTimeout(int timeout)
public void setMetadata(java.lang.String key,
java.lang.Object data)
setMetadata in interface com.netflix.astyanax.connectionpool.ConnectionContextpublic java.lang.Object getMetadata(java.lang.String key)
getMetadata in interface com.netflix.astyanax.connectionpool.ConnectionContextpublic boolean hasMetadata(java.lang.String key)
hasMetadata in interface com.netflix.astyanax.connectionpool.ConnectionContext