public class ThriftClientFactory extends CassandraClientFactory
ThriftClient Currently it uses Pelops for Connection
pooling. Need to replace it with our own pooling. Most of the code is
borrowed from PelopsClientFactory| Modifier and Type | Class and Description |
|---|---|
class |
ThriftClientFactory.Connection
Connection class holds client and related pool.
|
GenericClientFactory.LoadBalancer| Modifier and Type | Field and Description |
|---|---|
protected HostConfiguration |
configuration
The configuration.
|
timestampGeneratorclientMetadata, externalProperties, hostPools, hostRetryService, indexManager, kunderaMetadata, loadBalancingPolicy, propertyReader, reader, schemaManager| Constructor and Description |
|---|
ThriftClientFactory() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addCassandraHost(CassandraHost cassandraHost)
Adds a pool in hostPools map for given host.
|
protected Object |
createPoolOrConnection() |
void |
destroy() |
SchemaManager |
getSchemaManager(Map<String,Object> externalProperty) |
void |
initialize(Map<String,Object> externalProperty) |
protected void |
initializeLoadBalancer(String loadBalancingPolicyName) |
protected Client |
instantiateClient(String persistenceUnit) |
boolean |
isThreadSafe() |
initializeTimestampGeneratorgetClientInstance, getClientMetadata, getConnectionPoolOrConnection, getPersistenceUnit, load, loadClientMetadata, onValidation, setConnectionPoolOrConnection, setExternalProperties, setKunderaMetadata, unloadprotected HostConfiguration configuration
public SchemaManager getSchemaManager(Map<String,Object> externalProperty)
public void destroy()
public void initialize(Map<String,Object> externalProperty)
initialize in interface ClientLifeCycleManagerinitialize in class GenericClientFactoryprotected Object createPoolOrConnection()
createPoolOrConnection in class GenericClientFactoryprotected Client instantiateClient(String persistenceUnit)
instantiateClient in class GenericClientFactorypublic boolean isThreadSafe()
isThreadSafe in interface ClientLifeCycleManagerisThreadSafe in class GenericClientFactoryprotected void initializeLoadBalancer(String loadBalancingPolicyName)
initializeLoadBalancer in class GenericClientFactorypublic boolean addCassandraHost(CassandraHost cassandraHost)
addCassandraHost in class CassandraClientFactorycassandraHost - the cassandra hostCopyright © 2015. All Rights Reserved.