com.netflix.astyanax
Class AstyanaxContext.Builder

java.lang.Object
  extended by com.netflix.astyanax.AstyanaxContext.Builder
Enclosing class:
AstyanaxContext<Entity>

public static class AstyanaxContext.Builder
extends Object


Field Summary
protected  AstyanaxConfiguration asConfig
           
protected  String clusterName
           
protected  ConnectionPool<?> cp
           
protected  ConnectionPoolConfiguration cpConfig
           
protected  NodeDiscovery discovery
           
protected  com.google.common.base.Supplier<Map<BigInteger,List<Host>>> hostSupplier
           
protected  String keyspaceName
           
protected  ConnectionPoolMonitor monitor
           
protected  KeyspaceTracerFactory tracerFactory
           
 
Constructor Summary
AstyanaxContext.Builder()
           
 
Method Summary
<T> AstyanaxContext<Cluster>
buildCluster(AstyanaxTypeFactory<T> factory)
           
<T> AstyanaxContext<Keyspace>
buildKeyspace(AstyanaxTypeFactory<T> factory)
           
protected
<T> ConnectionPool<T>
createConnectionPool(ConnectionFactory<T> connectionFactory)
           
 AstyanaxContext.Builder forCluster(String clusterName)
           
 AstyanaxContext.Builder forKeyspace(String keyspaceName)
           
 NodeDiscoveryType getNodeDiscoveryType()
           
 AstyanaxContext.Builder withAstyanaxConfiguration(AstyanaxConfiguration asConfig)
           
 AstyanaxContext.Builder withConnectionPoolConfiguration(ConnectionPoolConfiguration cpConfig)
           
 AstyanaxContext.Builder withConnectionPoolMonitor(ConnectionPoolMonitor monitor)
           
 AstyanaxContext.Builder withHostSupplier(com.google.common.base.Supplier<Map<BigInteger,List<Host>>> tokenRangeSupplier)
           
 AstyanaxContext.Builder withTracerFactory(KeyspaceTracerFactory tracerFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cp

protected ConnectionPool<?> cp

discovery

protected NodeDiscovery discovery

cpConfig

protected ConnectionPoolConfiguration cpConfig

asConfig

protected AstyanaxConfiguration asConfig

clusterName

protected String clusterName

keyspaceName

protected String keyspaceName

tracerFactory

protected KeyspaceTracerFactory tracerFactory

hostSupplier

protected com.google.common.base.Supplier<Map<BigInteger,List<Host>>> hostSupplier

monitor

protected ConnectionPoolMonitor monitor
Constructor Detail

AstyanaxContext.Builder

public AstyanaxContext.Builder()
Method Detail

forCluster

public AstyanaxContext.Builder forCluster(String clusterName)

forKeyspace

public AstyanaxContext.Builder forKeyspace(String keyspaceName)

withConnectionPoolConfiguration

public AstyanaxContext.Builder withConnectionPoolConfiguration(ConnectionPoolConfiguration cpConfig)

withAstyanaxConfiguration

public AstyanaxContext.Builder withAstyanaxConfiguration(AstyanaxConfiguration asConfig)

withHostSupplier

public AstyanaxContext.Builder withHostSupplier(com.google.common.base.Supplier<Map<BigInteger,List<Host>>> tokenRangeSupplier)

withTracerFactory

public AstyanaxContext.Builder withTracerFactory(KeyspaceTracerFactory tracerFactory)

withConnectionPoolMonitor

public AstyanaxContext.Builder withConnectionPoolMonitor(ConnectionPoolMonitor monitor)

getNodeDiscoveryType

public NodeDiscoveryType getNodeDiscoveryType()

createConnectionPool

protected <T> ConnectionPool<T> createConnectionPool(ConnectionFactory<T> connectionFactory)

buildKeyspace

public <T> AstyanaxContext<Keyspace> buildKeyspace(AstyanaxTypeFactory<T> factory)

buildCluster

public <T> AstyanaxContext<Cluster> buildCluster(AstyanaxTypeFactory<T> factory)


Copyright © 2012. All Rights Reserved.