|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectme.prettyprint.cassandra.connection.client.HThriftClient
public class HThriftClient
| Field Summary | |
|---|---|
protected org.apache.cassandra.thrift.Cassandra.Client |
cassandraClient
|
protected String |
keyspaceName
|
protected int |
timeout
|
protected org.apache.thrift.transport.TTransport |
transport
|
| Constructor Summary | |
|---|---|
HThriftClient(CassandraHost cassandraHost)
Constructor |
|
| Method Summary | |
|---|---|
void |
clearAuthentication()
Clears current authentication |
HThriftClient |
close()
Close this client and its underlying connection. |
boolean |
equals(Object obj)
Compares the toString of these clients |
org.apache.cassandra.thrift.Cassandra.Client |
getCassandra()
Returns a new Cassandra.Client on each invocation using the underlying transport. |
org.apache.cassandra.thrift.Cassandra.Client |
getCassandra(String keyspaceNameArg)
Returns a new Cassandra.Client on each invocation using the underlying transport. |
CassandraHost |
getCassandraHost()
Retrieves the CassandraHost associate to this client. |
long |
getSinceLastUsed()
Retrieves the time in milliseconds since this client was used last time. |
boolean |
isAlreadyAuthenticated(Map<String,String> credentials)
Retrieves whether client has been authenticated with the given credentials. |
boolean |
isOpen()
Retrieves whether the underlying connection for this client is open or not. |
HThriftClient |
open()
Open a connection for this client. |
void |
setAuthenticated(Map<String,String> credentials)
Sets authentication credentials to the client. |
void |
startToUse()
Start tracking the beginning of use for this client. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final int timeout
protected String keyspaceName
protected org.apache.thrift.transport.TTransport transport
protected org.apache.cassandra.thrift.Cassandra.Client cassandraClient
| Constructor Detail |
|---|
public HThriftClient(CassandraHost cassandraHost)
cassandraHost - | Method Detail |
|---|
public org.apache.cassandra.thrift.Cassandra.Client getCassandra()
getCassandra in interface HClientpublic org.apache.cassandra.thrift.Cassandra.Client getCassandra(String keyspaceNameArg)
getCassandra in interface HClientkeyspaceNameArg - a keyspace
public HThriftClient close()
close in interface HClientpublic HThriftClient open()
open in interface HClientpublic boolean isOpen()
isOpen in interface HClientTRUE if the underlying connection for this client is
open. FALSE otherwisepublic void startToUse()
HClient.getSinceLastUsed()
startToUse in interface HClientpublic long getSinceLastUsed()
getSinceLastUsed in interface HClientpublic String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic CassandraHost getCassandraHost()
getCassandraHost in interface HClientCassandraHost object for this clientpublic boolean isAlreadyAuthenticated(Map<String,String> credentials)
isAlreadyAuthenticated in interface HClientcredentials - authentication credentials
TRUE if the client has previously been authenticated using the
credentials, FALSE otherwise (wrong credentials or not authenticated)public void clearAuthentication()
clearAuthentication in interface HClientpublic void setAuthenticated(Map<String,String> credentials)
setAuthenticated in interface HClientcredentials - credentials to be set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||