|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface HClient
Hector Client Interface.
| Method Summary | |
|---|---|
void |
clearAuthentication()
Clears current authentication |
HClient |
close()
Close this client and its underlying connection. |
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 |
getCreatedTime()
Returns the time that this HClient was created. |
long |
getLastSuccessTime()
Retrieves the time of the last success in milliseconds. |
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. |
HClient |
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. |
void |
updateLastSuccessTime()
Update the time of the last success with the current time. |
| Method Detail |
|---|
long getCreatedTime()
org.apache.cassandra.thrift.Cassandra.Client getCassandra()
IllegalStateException - if it is called on a closed clientorg.apache.cassandra.thrift.Cassandra.Client getCassandra(String keyspaceNameArg)
keyspaceNameArg - a keyspace
IllegalStateException - if it is called on a closed client
HInvalidRequestException - if the keyspace does not exist or if it is malformed
HectorTransportException - if any other error occursHClient close()
HClient open()
IllegalStateException - if this method is called from a client with an open connection
HectorTransportException - if the connection cannot be establishedboolean isOpen()
TRUE if the underlying connection for this client is
open. FALSE otherwisevoid startToUse()
getSinceLastUsed()
long getSinceLastUsed()
CassandraHost getCassandraHost()
CassandraHost object for this clientvoid setAuthenticated(Map<String,String> credentials)
credentials - credentials to be set.boolean isAlreadyAuthenticated(Map<String,String> credentials)
credentials - authentication credentials
TRUE if the client has previously been authenticated using the
credentials, FALSE otherwise (wrong credentials or not authenticated)void clearAuthentication()
long getLastSuccessTime()
void updateLastSuccessTime()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||