public class DataSource extends Object implements Externalizable
Modifier and Type | Field and Description |
---|---|
static long |
DFLT_SESSION_EXPIRATION_TIMEOUT
Default expiration timeout for Cassandra driver session.
|
Constructor and Description |
---|
DataSource() |
Modifier and Type | Method and Description |
---|---|
void |
readExternal(ObjectInput in) |
CassandraSession |
session(IgniteLogger log)
Creates Cassandra session wrapper if it wasn't created yet and returns it
|
void |
setAddressTranslator(com.datastax.driver.core.policies.AddressTranslator translator)
Sets address translator.
|
void |
setAuthProvider(com.datastax.driver.core.AuthProvider provider)
Sets authentication provider.
|
void |
setCollectMetrix(boolean collect)
Enables metrics collection.
|
void |
setCompression(String compression)
Sets compression algorithm to use for the transport.
|
void |
setContactPoints(String... points)
Sets list of contact points to connect to Cassandra cluster.
|
void |
setCredentials(Credentials creds)
Sets credentials to use for authentication.
|
void |
setFetchSize(int size)
Sets number of rows to immediately fetch in CQL statement execution.
|
void |
setJmxReporting(boolean enableReporting)
Enables JMX reporting of the metrics.
|
void |
setLoadBalancingPolicy(com.datastax.driver.core.policies.LoadBalancingPolicy plc)
Sets load balancing policy.
|
void |
setMaxSchemaAgreementWaitSeconds(int seconds)
Sets maximum time to wait for schema agreement before returning from a DDL query.
|
void |
setNettyOptions(com.datastax.driver.core.NettyOptions options)
Sets netty options to use.
|
void |
setPassword(String pwd)
Sets password to use for authentication.
|
void |
setPoolingOptions(com.datastax.driver.core.PoolingOptions options)
Sets pooling options.
|
void |
setPort(int port)
Sets port to use for Cassandra connection.
|
void |
setProtocolVersion(int ver)
Sets the native protocol version to use.
|
void |
setReadConsistency(String level)
Set consistency level for READ operations.
|
void |
setReconnectionPolicy(com.datastax.driver.core.policies.ReconnectionPolicy plc)
Sets reconnection policy.
|
void |
setRetryPolicy(com.datastax.driver.core.policies.RetryPolicy plc)
Sets retry policy.
|
void |
setSessionExpirationTimeout(long sessionExpirationTimeout)
Sets expiration timeout for Cassandra driver session.
|
void |
setSocketOptions(com.datastax.driver.core.SocketOptions options)
Sets socket options to use.
|
void |
setSpeculativeExecutionPolicy(com.datastax.driver.core.policies.SpeculativeExecutionPolicy plc)
Sets speculative execution policy.
|
void |
setSslOptions(com.datastax.driver.core.SSLOptions options)
Sets SSL options.
|
void |
setUser(String user)
Sets user name to use for authentication.
|
void |
setUseSSL(boolean use)
Enables SSL for communications with Cassandra.
|
void |
setWriteConsistency(String level)
Set consistency level for WRITE operations.
|
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public static final long DFLT_SESSION_EXPIRATION_TIMEOUT
public void setUser(String user)
user
- user namepublic void setPassword(String pwd)
pwd
- passwordpublic void setPort(int port)
port
- portpublic void setContactPoints(String... points)
points
- contact pointspublic void setMaxSchemaAgreementWaitSeconds(int seconds)
public void setProtocolVersion(int ver)
ver
- version numberpublic void setCompression(String compression)
compression
- Compression algorithm.public void setUseSSL(boolean use)
use
- Flag to enable/disable SSL.public void setCollectMetrix(boolean collect)
collect
- Flag to enable/disable metrics collection.public void setJmxReporting(boolean enableReporting)
enableReporting
- Flag to enable/disable JMX reporting.public void setFetchSize(int size)
size
- Number of rows to fetch.public void setReadConsistency(String level)
level
- Consistency level.public void setWriteConsistency(String level)
level
- Consistency level.public void setCredentials(Credentials creds)
creds
- Credentials.public void setLoadBalancingPolicy(com.datastax.driver.core.policies.LoadBalancingPolicy plc)
plc
- Load balancing policy.public void setReconnectionPolicy(com.datastax.driver.core.policies.ReconnectionPolicy plc)
plc
- Reconnection policy.public void setRetryPolicy(com.datastax.driver.core.policies.RetryPolicy plc)
plc
- Retry policy.public void setAddressTranslator(com.datastax.driver.core.policies.AddressTranslator translator)
translator
- Address translator.public void setSpeculativeExecutionPolicy(com.datastax.driver.core.policies.SpeculativeExecutionPolicy plc)
plc
- Speculative execution policy.public void setAuthProvider(com.datastax.driver.core.AuthProvider provider)
provider
- Authentication provider.public void setSslOptions(com.datastax.driver.core.SSLOptions options)
options
- SSL options.public void setPoolingOptions(com.datastax.driver.core.PoolingOptions options)
options
- pooling options to use.public void setSocketOptions(com.datastax.driver.core.SocketOptions options)
options
- Socket options.public void setNettyOptions(com.datastax.driver.core.NettyOptions options)
options
- netty options.public void setSessionExpirationTimeout(long sessionExpirationTimeout)
If set to 0
, timeout is disabled.
Default value is DFLT_SESSION_EXPIRATION_TIMEOUT
.
sessionExpirationTimeout
- Expiration timeout for Cassandra driver session.public CassandraSession session(IgniteLogger log)
log
- loggerpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024