public interface HClient
| Modifier and Type | Method and Description |
|---|---|
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.
|
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 keyspaceIllegalStateException - if it is called on a closed clientHInvalidRequestException - if the keyspace does not exist or if it is malformedHectorTransportException - if any other error occursHClient close()
HClient open()
IllegalStateException - if this method is called from a client with an open connectionHectorTransportException - 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 credentialsTRUE if the client has previously been authenticated using the
credentials, FALSE otherwise (wrong credentials or not authenticated)void clearAuthentication()
long getLastSuccessTime()
void updateLastSuccessTime()
Copyright © 2014. All Rights Reserved.