Java 类com.datastax.driver.core.policies.ReconnectionPolicy 实例源码

项目:flipper-reverse-image-search    文件:CassandraProperties.java   
/**
 * Parse the reconnection policy.
 */
public static ReconnectionPolicy parseReconnectionPolicy(String reconnectionPolicyString) throws
    InstantiationException, IllegalAccessException, ClassNotFoundException, NoSuchMethodException,
    SecurityException, IllegalArgumentException, InvocationTargetException {
    String lb_regex = "([a-zA-Z]*Policy)(\\()(.*)(\\))";
    Pattern lb_pattern = Pattern.compile(lb_regex);
    Matcher lb_matcher = lb_pattern.matcher(reconnectionPolicyString);
    if (lb_matcher.matches()) {
        if (lb_matcher.groupCount() > 0) {
            // Primary LB policy has been specified
            String primaryReconnectionPolicy = lb_matcher.group(1);
            String reconnectionPolicyParams = lb_matcher.group(3);
            return getReconnectionPolicy(primaryReconnectionPolicy, reconnectionPolicyParams);
        }
    }
    return null;
}
项目:ignite    文件:DataSource.java   
/**
 * Sets reconnection policy.
 *
 * @param plc Reconnection policy.
 */
@SuppressWarnings("UnusedDeclaration")
public void setReconnectionPolicy(ReconnectionPolicy plc) {
    reconnectionPlc = plc;

    invalidate();
}
项目:ignite    文件:DataSource.java   
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    fetchSize = (Integer)in.readObject();
    readConsistency = (ConsistencyLevel)in.readObject();
    writeConsistency = (ConsistencyLevel)in.readObject();
    user = U.readString(in);
    pwd = U.readString(in);
    port = (Integer)in.readObject();
    contactPoints = (List<InetAddress>)in.readObject();
    contactPointsWithPorts = (List<InetSocketAddress>)in.readObject();
    maxSchemaAgreementWaitSeconds = (Integer)in.readObject();
    protoVer = (Integer)in.readObject();
    compression = U.readString(in);
    useSSL = (Boolean)in.readObject();
    collectMetrix = (Boolean)in.readObject();
    jmxReporting = (Boolean)in.readObject();
    creds = (Credentials)in.readObject();
    loadBalancingPlc = (LoadBalancingPolicy)readObject(in);
    reconnectionPlc = (ReconnectionPolicy)readObject(in);
    addrTranslator = (AddressTranslator)readObject(in);
    speculativeExecutionPlc = (SpeculativeExecutionPolicy)readObject(in);
    authProvider = (AuthProvider)readObject(in);
    sslOptions = (SSLOptions)readObject(in);
    poolingOptions = (PoolingOptions)readObject(in);
    sockOptions = (SocketOptions)readObject(in);
    nettyOptions = (NettyOptions)readObject(in);
}
项目:Lagerta    文件:DataSource.java   
/**
 * Sets reconnection policy.
 *
 * @param plc Reconnection policy.
 */
@SuppressWarnings("UnusedDeclaration")
public void setReconnectionPolicy(ReconnectionPolicy plc) {
    this.reconnectionPlc = plc;
    invalidate();
}
项目:Lagerta    文件:DataSource.java   
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    fetchSize = (Integer)in.readObject();
    readConsistency = (ConsistencyLevel)in.readObject();
    writeConsistency = (ConsistencyLevel)in.readObject();
    user = U.readString(in);
    pwd = U.readString(in);
    port = (Integer)in.readObject();
    contactPoints = (List<InetAddress>)in.readObject();
    contactPointsWithPorts = (List<InetSocketAddress>)in.readObject();
    maxSchemaAgreementWaitSeconds = (Integer)in.readObject();
    protoVer = (Integer)in.readObject();
    compression = U.readString(in);
    useSSL = (Boolean)in.readObject();
    collectMetrix = (Boolean)in.readObject();
    jmxReporting = (Boolean)in.readObject();
    creds = (Credentials)in.readObject();
    loadBalancingPlc = (LoadBalancingPolicy)readObject(in);
    reconnectionPlc = (ReconnectionPolicy)readObject(in);
    addrTranslator = (AddressTranslator)readObject(in);
    speculativeExecutionPlc = (SpeculativeExecutionPolicy)readObject(in);
    authProvider = (AuthProvider)readObject(in);
    sslOptions = (SSLOptions)readObject(in);
    poolingOptions = (PoolingOptions)readObject(in);
    sockOptions = (SocketOptions)readObject(in);
    nettyOptions = (NettyOptions)readObject(in);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:CassandraProperties.java   
public Class<? extends ReconnectionPolicy> getReconnectionPolicy() {
    return this.reconnectionPolicy;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:CassandraProperties.java   
public void setReconnectionPolicy(
        Class<? extends ReconnectionPolicy> reconnectionPolicy) {
    this.reconnectionPolicy = reconnectionPolicy;
}
项目:spring-boot-concourse    文件:CassandraProperties.java   
public Class<? extends ReconnectionPolicy> getReconnectionPolicy() {
    return this.reconnectionPolicy;
}
项目:spring-boot-concourse    文件:CassandraProperties.java   
public void setReconnectionPolicy(
        Class<? extends ReconnectionPolicy> reconnectionPolicy) {
    this.reconnectionPolicy = reconnectionPolicy;
}
项目:contestparser    文件:CassandraProperties.java   
public Class<? extends ReconnectionPolicy> getReconnectionPolicy() {
    return this.reconnectionPolicy;
}
项目:contestparser    文件:CassandraProperties.java   
public void setReconnectionPolicy(
        Class<? extends ReconnectionPolicy> reconnectionPolicy) {
    this.reconnectionPolicy = reconnectionPolicy;
}
项目:realtime-analytics    文件:CassandraConfig.java   
public ReconnectionPolicy getReconnectionPolicy() {
    return reconnectionPolicy;
}
项目:realtime-analytics    文件:CassandraConfig.java   
public void setReconnectionPolicy(ReconnectionPolicy reconnectionPolicy) {
    this.reconnectionPolicy = reconnectionPolicy;
}
项目:dropwizard-cassandra    文件:ExponentialReconnectionPolicyFactory.java   
@Override
public ReconnectionPolicy build() {
    return new ExponentialReconnectionPolicy(baseDelay.toMilliseconds(), maxDelay.toMilliseconds());
}
项目:dropwizard-cassandra    文件:ConstantReconnectionPolicyFactory.java   
@Override
public ReconnectionPolicy build() {
    return new ConstantReconnectionPolicy(delay.toMilliseconds());
}
项目:camel-cql    文件:ClusterBean.java   
/**
 * @return the reconnectionPolicy
 */
public ReconnectionPolicy getReconnectionPolicy() {
    return reconnectionPolicy;
}
项目:vertx-mod-cassandra-persistor    文件:CassandraPersistor.java   
public ReconnectionPolicy getReconnectionPolicy() {
    return reconnectionPolicy;
}
项目:vertx-mod-cassandra-persistor    文件:CassandraPersistor.java   
public void setReconnectionPolicy(ReconnectionPolicy reconnectionPolicy) {
    this.reconnectionPolicy = reconnectionPolicy;
}
项目:spring-cloud-connectors    文件:CassandraClusterConfig.java   
public ReconnectionPolicy getReconnectionPolicy() {
    return reconnectionPolicy;
}
项目:spring-cloud-connectors    文件:CassandraClusterConfig.java   
public void setReconnectionPolicy(ReconnectionPolicy reconnectionPolicy) {
    this.reconnectionPolicy = reconnectionPolicy;
}
项目:apex-malhar    文件:ConnectionStateManager.java   
/**
 * Used to decide how to establish a connection to the cluster in case the current one fails.
 * The default if not set is to use an ExponentialRetry Policy.
 * The baseDelay and maxDelay are the two time windows that are used to specify the retry attempts
 * in an exponential manner
 * @param reconnectionPolicy
 * @return The builder instance as initially created updated with this value
 */
public ConnectionBuilder withReconnectionPolicy(ReconnectionPolicy reconnectionPolicy)
{
  this.reconnectionPolicy = reconnectionPolicy;
  return this;
}
项目:camel-cql    文件:ClusterBean.java   
/**
 * @param reconnectionPolicy
 *            the reconnectionPolicy to set
 */
public void setReconnectionPolicy(ReconnectionPolicy reconnectionPolicy) {
    this.reconnectionPolicy = reconnectionPolicy;
}
项目:dropwizard-cassandra    文件:ReconnectionPolicyFactory.java   
ReconnectionPolicy build();